17-04-2011, 12:34 PM
السلام عليكم و رحمة الله و بركاته
بالتوفيق,,
PHP كود :
function Trim(const S: string): string;
var
I, L: Integer;
begin
L := Length(S);
I := 1;
while (I <= L) and (S[I] <= ' ') do Inc(I);
if I > L then Result := '' else
begin
while S[L] <= ' ' do Dec(L);
Result := Copy(S, I, L - I + 1);
end;
end;
//Or
Uses
SysUtils;
...
Trim(' delphi4arab');
I'M Fly Like A G6

