Garry's Mod Wiki

Garry's Mod Wiki

  string string.Left( string str, number num )

Description

Returns everything left of supplied place of that string.

Arguments

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

Returns

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

Example

Extracts "garry" from "garrys mod" string.

local text = "garrys mod" print(string.Left(text, 5))
Output: garry

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...