Home > lang > left 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
Left$
Result = Left$ ( Arg AS String [ , Length AS Integer ] ) AS String
Result = Left ( Arg AS String [ , Length AS Integer ] ) AS String

Returns the Length first characters of the string Arg.

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 is returned.

Left$ is optimized so that no string duplication occurs to generate the result.

This function only deal with ASCII strings. To manipulate UTF-8 strings, use the String class.

Example

PRINT Left$("Gambas", 4)

Gamb

PRINT Left$("Gambas")

G

PRINT Left$("Gambas", -1)

Gamba

See also

String Functions