Garry's Mod Wiki

string.GetExtensionFromFilename

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

Special Pages


Wikis

?

Render Time: 22ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 6
Render Body 0
Render Sidebar 7