2010-01-26 09:09:09 -05:00
|
|
|
function psFormat(const fmt : string;const args : array of const) : string;
stdcall;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
|
|
|
Result := Format(fmt,Args);
|
|
|
|
end;
|
|
|
|
|
2010-01-26 09:09:09 -05:00
|
|
|
function Capitalize(str : string) : string;
stdcall;
|
2010-01-25 08:59:44 -05:00
|
|
|
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;
|
|
|
|
|
2010-01-26 09:09:09 -05:00
|
|
|
function psBoolToStr(bool : boolean) : string;
stdcall;
|
2010-01-25 08:59:44 -05:00
|
|
|
begin;
|
|
|
|
result := BoolToStr(bool,true);
|
|
|
|
end;
|