Difference between revisions of "Str.upper"

From OpenEUO
Jump to: navigation, search
m (Created page with "== Calling Pattern == Call local r[,...] = sl.str.upper(a[,...]) Args a1...aN are strings, numbers, booleans, or nil Results r1...rN are strings == Usage Example == local ...")
 
(No difference)

Latest revision as of 18:42, 11 November 2010

Calling Pattern

Call

local r[,...] = sl.str.upper(a[,...])

Args

a1...aN are strings, numbers, booleans, or nil

Results

r1...rN are strings


Usage Example

local s = sl.str
local a,b,c =
  'One string',
  'Two strings',
  'Three strings'
local r1,r2,r3 = s.upper(a,b,c)
print(r1)
print(r2)
print(r3)
--> ONE STRING
--> TWO STRINGS
--> THREE STRINGS

Description

Upper returns the uppercase version of all string arguments. Numerics and booleans are converted to strings first. Nils are converted to empty strings.

Upon Error

Upper fails silently. If upper receives no arguments then nil is returned.

See Also