How to delete last character of String with substring
or anything ?
For example;
var
query : String;
begin
query:= \'test=1&line
I think I would write this as:
NewValue := OldValue.Substring(0, OldValue.Length - 1);
I think the functional interface, that is a function returning a new value, is usually to be preferred over a procedure with side-effects. I find the assignment operator is a clear indicator that a new value is being assigned to the variable. Using a functional approach makes the syntax much cleaner when you want the new value to be stored in a different variable from the original value.