references/sleep-functions/left.md

GitHub

left

Category: Strings

Source: https://sleep.dashnine.org/manual/left.html


Synopsis

$ left("string", n)

Returns the left n characters of "string"

Parameters

"string" - the string to get the characters from.

n - number of characters to grab

Returns

A scalar string.

Examples

Example:

println(left("abcde", 3));

Output:

abc

See Also

&byteAt; &charAt; ∣ &right; &strlen; &substr