AnsiLeftStr
Belongs to : FunctionDescription
The AnsiLeftStr extracts characters from the left of a string.
It attempts to return the leftmost Count characters from Source.
If Count exceeds the size of the source, the whole of source is returned.
Example code
1 2 3 4 5 6 7 8 9 10 11 12 |
var source, target : AnsiString; begin source := '123456789'; target := AnsiLeftStr(source, 3); ShowMessage('Source = '+source); ShowMessage('Target = '+target); end; Show full unit code Source = 123456789 Target = 123 |