Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:3.9.0

Description

Description:Strips the file extension from the given path. Both the path without the extension and the stripped extension are returned.

Syntax

Syntax:[filePath] call fn_vbs_stripExtension
Parameters:
  • filePath: String - File path to strip the extension from.
Return Value:Array - [path without extension, extension]

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_result = ["\vbs2\ui\tacticmarkers\data\frames\friend_units.paa"] call fn_vbs_stripExtension;
// _result is ["\vbs2\ui\tacticmarkers\data\frames\friend_units","paa"]
_result = ["\vbs2\ui\tacticmarkers\data\frames\friend_units"] call fn_vbs_stripExtension;
// _result is ["\vbs2\ui\tacticmarkers\data\frames\friend_units",""]

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes