string.Left

From GMod Wiki

Revision as of 18:22, 23 August 2010 by Dotmister (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax string.Left( String s, Integer length )
Where is this used?
Description:
Returns length characters of s, starting from the left.
Returns: String
Part of Library: String
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=String.Left]String.Left [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]




Example

DescriptionDemonstrates how to split a string using string.Left
Used onNewerShared.png
Code
print(string.Left("foobar", 3))
OutputPrints "foo" to the console.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox