EgtGeneral 1.6l11 :
- aggiunta funzione GetFileTitleEgt.
This commit is contained in:
@@ -138,6 +138,19 @@ GetFileName( const string& sPath)
|
||||
return sPath.substr( iPos+1) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
string
|
||||
GetFileTitleEgt( const string& sPath)
|
||||
{
|
||||
// cerco l'ultimo separatore
|
||||
size_t iPos = sPath.find_last_of( "/\\") ;
|
||||
// recupero il nome
|
||||
string sName = (( iPos == string::npos) ? sPath : sPath.substr( iPos + 1)) ;
|
||||
// tolgo l'eventuale estensione
|
||||
size_t iPos2 = sName.find_last_of( ".") ;
|
||||
return (( iPos2 == string::npos) ? sName : sName.substr( 0, iPos2)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
string
|
||||
GetDirectory( const string& sPath)
|
||||
|
||||
Reference in New Issue
Block a user