string.GetFileFromFilename
From GMod Wiki
Function | |
Syntax |
string.GetFileFromFilename( String file ) Where is this used? |
Description: | |
Returns the filename of a File. | |
Returns: | String Filename |
Part of Library: | String |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=String.GetFileFromFilename]String.GetFileFromFilename [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Will output the filename of a File from its Filename. |
---|---|
Used on | |
Code | Msg(string.GetFileFromFilename("wukka/ubercoolfolder/myfile.txt")) |
Output | Will output "myfile.txt" in console. |
Additional Notes
- Returns nothing ( An empty string ) if the string provided has no slashes in it.