Garry's Mod Wiki

string.GetExtensionFromFilename

string string.GetExtensionFromFilename( string file )

Description

Returns extension of the file.

Arguments

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

Returns

1 string
fileExtension

Example

Prints the extension of the file.

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

Page Links


Special Pages


Wikis

?

Render Time: 31ms

DB GetPage 5
Generate Html 4
SaveChanges (1) 8
Render Body 0
Render Sidebar 12