| Description |
|
The TrimLeft function removes blank and control characters (such as line feed) from the start of a string.
|
|
| Related commands |
| Delete |
|
Delete a section of characters from a string |
| AnsiMidStr |
|
Returns a substring from the middle characters of a string |
| AnsiLeftStr |
|
Extracts characters from the left of a string |
| AnsiRightStr |
|
Extracts characters from the right of a string |
| Trim |
|
Removes leading and trailing blanks from a string |
| TrimRight |
|
Removes trailing blanks from a string |
|
|
|
| Example code : Illustrating Trim, TrimLeft and TrimRight |
const
PaddedString = ' Letters ';
begin
WriteLn('[' + TrimLeft(PaddedString) + ']');
WriteLn('[' + TrimRight(PaddedString) + ']');
WriteLn('[' + Trim(PaddedString) + ']');
end;
|
| Show full unit code |
[Letters ]
[ Letters]
[Letters]
|
|