Difference between revisions of "Str.left"

From OpenEUO
Jump to: navigation, search
m (Created page with "== 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...")
 
(No difference)

Latest revision as of 18:13, 11 November 2010

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