Garry's Mod Wiki

string.Right

string string.Right( string str, number num )

Description

Returns the last n-th characters of the string.

Arguments

1 string str
The string to extract from.
2 number num
Amount of chars relative to the end (starting from 1).

Returns

1 string
Returns a string containing a specified number of characters from the right side of a string.

Example

Extracts "mod" from "garrys mod" string.

local text = "garrys mod" print( string.Right( text, 3 ) )
Output: mod

Page Links


Special Pages


Wikis

?

Render Time: 73ms

DB GetPage 40
Generate Html 3
SaveChanges (1) 15
Render Body 0
Render Sidebar 11