ilklhl1Lihl1
06-03-2012, 06:00 PM
I am trying to trim a string from the fourth char to the end -1
here is my function:
function trim2(str: string): string;
var
i, l: Integer;
begin
l := Length(str);
for i := 4 to l-1 do
Result := Copy(str, i, ((l + 1) - i));
end;
It returns nothing, can somebody help me with this?
My string ressembles to something like this '[ ] blablabla?' so i want to remove the '[ ] ' and the '?'
Thank you :)
here is my function:
function trim2(str: string): string;
var
i, l: Integer;
begin
l := Length(str);
for i := 4 to l-1 do
Result := Copy(str, i, ((l + 1) - i));
end;
It returns nothing, can somebody help me with this?
My string ressembles to something like this '[ ] blablabla?' so i want to remove the '[ ] ' and the '?'
Thank you :)