Garry's Mod Wiki

Garry's Mod Wiki

  string string.GetExtensionFromFilename( string path )

Description

Returns extension of the file.

Arguments

1 string path
The string eg. file-path to get the file extension from.

Returns

1 string
File extension or nil.

Example

Prints the extension of the file.

print(string.GetExtensionFromFilename("garrysmod/lua/modules/string.lua"))
Output: lua

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...