anisette is done, how to sign?
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
//================= Copyright kotofyt, All rights reserved ==================//
|
||||
// Purpose: Command line handler for argc and argv. It also allows to find
|
||||
// parameters and push your own.
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef TIER1_COMMANDLINE_H
|
||||
#define TIER1_COMMANDLINE_H
|
||||
|
||||
|
||||
#include "tier0/platform.h"
|
||||
|
||||
abstract_class ICommandLine
|
||||
{
|
||||
public:
|
||||
virtual void CreateCommandLine( int argc, char **argv ) = 0;
|
||||
|
||||
virtual bool CheckParam( const char *psz ) = 0;
|
||||
virtual char *ParamValue( const char* psz, const char *szDefaultValue = 0 ) = 0;
|
||||
|
||||
virtual void AddParam( char *psz ) = 0;
|
||||
virtual void RemoveParam( char *psz ) = 0;
|
||||
|
||||
virtual int ParamCount() = 0;
|
||||
virtual int FindParam( const char *psz ) = 0;
|
||||
virtual const char *GetParam(int nIndex) = 0;
|
||||
};
|
||||
|
||||
ICommandLine *CommandLine();
|
||||
|
||||
#endif
|
||||
@@ -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