basename

Top  Previous  Next

Scripts > Class elements and c++ instructions > File handling > basename

 

Prototype

 

str basename( const str& xsPath );

 

Description

 

If the substring after the last path separator in the path xsPath contains a dot ('.'), the substring ending at the last dot (the dot is not included) is returned. Otherwise the entire substring is returned.

 

 

Example 1:

 

out << basename("D:\\TextTransformer\\Settings\\EditDefault.ds");

 

Output::

 

EditDefault

 

Example 2:

 

out << basename("D:\\TextTransformer\\Settings");

 

Output::

 

Settings

 

 

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German