Garry's Mod Wiki

string.Split

table string.Split( string Inputstring, string Separator )

Description

Splits the string into a table of strings, separated by the second argument.

Arguments

1 string Inputstring
String to split
2 string Separator
Character(s) to split with.

Returns

1 table
Split table

Example

Demonstrates the use of this function.

local mystring = "This is some text" PrintTable( string.Split( mystring, " " ) )
Output:
1 = This 2 = is 3 = some 4 = text

Page Links


Special Pages


Wikis

?

Render Time: 76ms

DB GetPage 48
Generate Html 4
SaveChanges (1) 9
Render Body 0
Render Sidebar 12