Паскалевский эквивалент StrTok
Автор: Mike Scott
function NextToken( P : PChar ; Divider : PChar ) : PChar ;
const
next : PChar = nil ;
begin
if P = nil then
P := next ;
if P <> nil then
begin
next := StrPos( P, Divider ) ;
if next <> nil then
begin
next^ := #0 ;
next := @next[ StrLen( Divider ) ] ;
end ;
end ;
NextToken := P ;
end ;
|
|