string.Explode

From GMod Wiki

Jump to: navigation, search
Function
Syntax string.Explode( String separator, String string [, Boolean usepatterns ] )
Where is this used?
Description:
Separates a string.
Returns: Table
Part of Library: String
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=String.Explode]String.Explode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example will separate "Garry's Mod 10". Sep[1] will equal "Garry's", Sep[2] will equal "Mod", and Sep[3] will equal "10".
Used onNewerShared.png
Code
local Sep = string.Explode(" ", "Garry's Mod 10")
PrintTable(Sep)
Output1 = "Garry's"

2 = "Mod"

3 = "10"


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox