string.len

From GMod Wiki

Revision as of 11:22, 20 December 2010 by Cube334 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax string.len( String String )
Where is this used?
Description:
Returns the length of the supplied string.
Returns: Integer
Part of Library: String
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=String.len]String.len [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionWill output the length of the supplied string.
Used onNewerShared.png
Code
Msg( tostring( string.len("Hello World") ) ) // prints 11 ( string # of characters ) to the console
OutputWill output the amount of characters in the string - in this case, 11.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox