You've already forked lazarus-ccr
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:
@ -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.
|
||||
|
Reference in New Issue
Block a user