mirror of https://gitlab.com/basile.b/dexed.git
add string helper to convert to int
This commit is contained in:
parent
be6ea9d712
commit
9c50cfa789
|
@ -80,6 +80,8 @@ type
|
|||
function dirExists: boolean;
|
||||
function upperCase: string;
|
||||
function length: integer;
|
||||
function toIntNoExcept(default: integer = -1): integer;
|
||||
function toInt: integer;
|
||||
end;
|
||||
|
||||
(**
|
||||
|
@ -430,6 +432,16 @@ begin
|
|||
exit(system.length(self));
|
||||
end;
|
||||
|
||||
function TStringHelper.toInt: integer;
|
||||
begin
|
||||
exit(strToInt(self));
|
||||
end;
|
||||
|
||||
function TStringHelper.toIntNoExcept(default: integer = -1): integer;
|
||||
begin
|
||||
exit(StrToIntDef(self, default));
|
||||
end;
|
||||
|
||||
procedure TProcessEx.Assign(aValue: TPersistent);
|
||||
var
|
||||
src: TProcess;
|
||||
|
|
Loading…
Reference in New Issue