function string StrTrim(svString)
int i,len;
string sLeft,sRight;
begin
len = StrLength(svString);
if (len>0) then
i=0;
//zLewej
while ((svString[i]==" ")||(i>=len))
i++;
endwhile;
if (len>i) then
StrSub(sLeft,svString,i,len);
else
sLeft = svString;
endif;
else
sLeft = svString;
endif;
len = StrLength(sLeft);
if (len>0) then
i=len-1;
while ((i>=0)&&(sLeft[i]==" "))
i--;
endwhile;
if (i>=0) then
StrSub(sRight,sLeft,0,i+1);
else
sRight = "";
endif;
else
sRight = sLeft;
endif;
return sRight; //Obciety z lewej i prawej
end;
Programowanie c++/c#/delphi/javas/php/installscript/nativescript
Przykłady - przydatne funkcje
wtorek, 27 października 2009
funkcja TRIM - spacje
Etykiety:
InstallShield - funkcje
Subskrybuj:
Komentarze do posta (Atom)
Brak komentarzy:
Prześlij komentarz