cleanup, optimize

This commit is contained in:
Glenn Maynard
2005-08-26 19:13:08 +00:00
parent 977322be05
commit eb05db1305
2 changed files with 5 additions and 11 deletions
+5 -9
View File
@@ -126,6 +126,11 @@ static char* tcsepbrk( const char* psz, const char* chset, int escape )
return pch;
}
static bool XIsEmptyString( const CString &s )
{
return s.find_first_not_of( "\r\n\t " ) == s.npos;
}
// Desc : put string of (psz~end) on ps string
static void SetString( char* psz, char* end, CString* ps, bool trim = false, int escape = 0 )
{
@@ -987,12 +992,3 @@ bool XNode::SaveToFile( const CString &sFile, DISP_OPT *opt ) const
return SaveToFile( f, opt );
}
bool XIsEmptyString( const char* str )
{
CString s(str);
TrimLeft( s );
TrimRight( s );
return ( s.empty() || s == "" );
}