Difference between revisions of "Str.del"

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

Latest revision as of 16:07, 11 November 2010

Calling Pattern

Call

local s2 = sl.str.del(s1,n,m)

Args

s1 is a string
n,m are numbers

Results

s2 is a string

Usage Example

local s = sl.str
local r = s.del('One really long string.',5,7)
print(r)
--> One long string.

Description

Deletes a subsection of string s1 and returns the altered string. Section removed begins at character n and runs for m characters.

Upon Error

Del fails silently. If del receives incorrect parameter types, then '' (an empty string) is returned.

See Also