comp • gb • string • left

String.Left (gb)

Static Function Left ( String As String [ , Length As Integer ] ) As String

Returns the Length first characters of an UTF-8 string.

If Length is not specified, the first character of the string is returned.

If Length is negative, all the string except the (- Length ) last characters are returned.

This function deals with UTF-8 strings, and so all positions and lengths are given in characters and not in bytes. To manipulate ASCII strings, use Left$

See also