mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-14 05:15:16 -05:00
39e4249670
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@435 3f818213-9676-44b0-a9b4-5e4c4e03d09d
27 lines
616 B
PHP
27 lines
616 B
PHP
function psFormat(const fmt : string;const args : array of const) : string;
|
|
begin;
|
|
Result := Format(fmt,Args);
|
|
end;
|
|
|
|
function Capitalize(str : string) : string;
|
|
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;
|
|
begin;
|
|
result := BoolToStr(bool,true);
|
|
end;
|