string.reverse

From GMod Wiki

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



Examples

DescriptionReverses the string "Testing!"
Used onNewerShared.png
Code
 
local txt = "Testing!"
Msg(txt)
--Now reversed
txt = string.reverse(txt)
Msg(txt)
--Shows "!gnitseT"
 
Output"!gnitseT" in console
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox