Garry's Mod Wiki

string.reverse

  string string.reverse( string str )

Description

Reverses a string.

Arguments

1 string str
The string to be reversed.

Returns

1 string
reversed string

Example

Reverse "abcdef".

print( string.reverse( "abcdef" ) )
Output: fedcba