string.GetExtensionFromFilename

From Garry's Mod
Jump to: navigation, search
 string.GetExtensionFromFilename( )

Contents

Description

Returns extension of the file.

Arguments

string file

String eg. file-path to get the file extensions from.

Returns

string

fileExtension

Examples

Example

Prints the extension of the file.

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

Output:


lua
Personal tools
Navigation