Garry's Mod Wiki

string.StripExtension

  string string.StripExtension( string Inputstring )

Description

Removes the extension of a path.

Arguments

1 string Inputstring
The path to change.

Returns

1 string
Modifiedstring

Example

Demonstrates the use of string.StripExtension

MsgN(string.StripExtension("garrysmod/lua/modules/string.lua"))
Output: "garrysmod/lua/modules/string"