1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-08-13 16:53:59 -04:00
Simba/trunk/Units/MMLAddon/PSInc/Wrappers/strings.inc
2010-01-26 16:51:36 +00:00

1 line
620 B
PHP

function psFormat(const fmt : string;const args : array of const) : string;
ps_decl;
begin;
Result := Format(fmt,Args);
end;
function Capitalize(str : string) : string;
ps_decl;
var
i , l : integer;
cap : boolean;
begin;
result := str;
l := length(str);
cap := true;
for i := 1 to l do
if cap and (str[i] in ['a'..'z'] + ['A'..'Z']) then
begin;
result[i] := UpperCase(str[i])[1];
cap := false;
end else if not (str[i] in ['a'..'z'] + ['A'..'Z']) then
cap := true;
end;
function psBoolToStr(bool : boolean) : string;
ps_decl;
begin;
result := BoolToStr(bool,true);
end;