string.ToTable

From GMod Wiki

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



Example

DescriptionTurns a string into a table.
Used onNewerShared.png
Code
 
 
local text = "Hello, World!"
local text2 = string.ToTable(text)
PrintTable(text2)
 
Output
 
1	=	H
2	=	e
3	=	l
4	=	l
5	=	o
6	=	,
7	=	 
8	=	W
9	=	o
10	=	r
11	=	l
12	=	d
13	=	!
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox