anisette is done, how to sign?
This commit is contained in:
@@ -26,6 +26,7 @@ public:
|
||||
void RemoveAt( size_t nPosition, size_t nCount );
|
||||
|
||||
CUtlString GetFileName();
|
||||
CUtlString GetFileExtension();
|
||||
CUtlString GetDirectory();
|
||||
CUtlString RemoveHeadFile();
|
||||
|
||||
@@ -126,13 +127,35 @@ inline CUtlString CUtlString::GetFileName()
|
||||
while (pLast != m_data.GetData())
|
||||
{
|
||||
if (*pLast=='/')
|
||||
{
|
||||
pLast++;
|
||||
break;
|
||||
}
|
||||
pLast--;
|
||||
}
|
||||
|
||||
return pLast;
|
||||
}
|
||||
|
||||
inline CUtlString CUtlString::GetFileExtension()
|
||||
{
|
||||
CUtlString szFileName = GetString();
|
||||
|
||||
char *pLast = &m_data[GetLenght()-1];
|
||||
while (pLast != m_data.GetData())
|
||||
{
|
||||
if (*pLast=='.')
|
||||
break;
|
||||
if (*pLast=='/')
|
||||
return NULL;
|
||||
pLast--;
|
||||
}
|
||||
|
||||
return pLast+1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline CUtlString CUtlString::GetDirectory()
|
||||
{
|
||||
if (GetLenght() == 0)
|
||||
|
||||
Reference in New Issue
Block a user