minor fix in TRxDBLookupCombo, TRxLookupEdit. New procedure in rxstrutils

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2007-10-30 11:43:24 +00:00
parent d635a63cbb
commit aaf09b3fb1
16 changed files with 298 additions and 65 deletions

View File

@ -15,7 +15,7 @@ unit rxstrutils;
interface
uses SysUtils ;
uses SysUtils, Classes;
type
{$IFNDEF RX_D4}
@ -207,8 +207,10 @@ function RomanToInt(const S: string): Longint;
{ RomanToInt converts the given string to an integer value. If the string
doesn't contain a valid roman numeric value, the 0 value is returned. }
procedure StrToStrings(const S:string; const List:TStrings; const Delims:Char);
const
CRLF = #13#10;
// CRLF = #13#10;
DigitChars = ['0'..'9'];
{$IFNDEF CBUILDER}
Brackets = ['(',')','[',']','{','}'];
@ -1081,4 +1083,27 @@ begin
end;
end;
procedure StrToStrings(const S:string; const List:TStrings; const Delims:Char);
var
i,j:integer;
begin
if S<>'' then
begin
j:=1;
for i:=1 to Length(S) do
begin
if S[i] = Delims then
begin
if i>j+1 then
begin
List.Add(Copy(S, j, i-j));
end;
j:=i+1;
end;
end;
if j<Length(S) then
List.Add(Copy(S, j, Length(S)));
end;
end;
end.