Garry's Mod Wiki

Revision Difference

string.GetFileFromFilename#512001

<function name="GetFileFromFilename" parent="string" type="libraryfunc">⤶ <description>Returns file name and extension.</description>⤶ <realm>Shared and Menu</realm>⤶ <file line="150">lua/includes/extensions/string.lua</file>⤶ <args>⤶ <arg name="pathString" type="string">The string eg. file-path to get the file-name from.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="string">The file name</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Returns the file name.</description>⤶ <code>print( string.GetFileFromFilename( "garrysmod/lua/modules/string.lua" ) )</code>⤶ <output>string.lua</output>⤶ ⤶ </example>