{
Convert string lines with CRLF delimeters into text.
}
function StringToText(s:String):Integer;
var t,p:Integer; b:Boolean;
begin
 t:=text_new;
 while Length(s)>0 do begin
  p:=Pos(CRLF,s);
  if p=0 then p:=Length(s)+1;
  if p>1 then b:=text_addln(t,Copy(s,1,p-1));
  s:=Copy(s,p+2);
 end;
 StringToText:=t;
end;
