Difference between revisions of "Str.mid"

From OpenEUO
Jump to: navigation, search
m (Created page with "== Calling Pattern == Call local r = sl.str.mid(a,m,n) Args a is a string m,n are numbers Results r is a string == Usage Example == local s = sl.str local r = s.mid('Get...")
 
(No difference)

Latest revision as of 18:19, 11 November 2010

Calling Pattern

Call

local r = sl.str.mid(a,m,n)

Args

a is a string
m,n are numbers

Results

r is a string


Usage Example

local s = sl.str
local r = s.mid('Get the middle part of a string.',9,11)
print(r)
--> middle part

Description

Mid returns the n characters from string a, beginning at position m.

Upon Error

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

See Also