Str.left

From OpenEUO
Jump to: navigation, search

Calling Pattern

Call

local r = sl.str.left(a,n)

Args

a is a string

Results

r is a string


Usage Example

local s = sl.str
local r = s.left('Get the left side of a string.',12)
print(r)
--> Get the left

Description

Left returns the leftmost n characters of string a.

Upon Error

Left fails silently. If left receives inappropriate arguments then a '' (empty string) is returned.

See Also