Include :

- aggiunta CompareNoCase
- aggiornamento.
This commit is contained in:
Dario Sassi
2015-05-07 07:03:39 +00:00
parent 8fb9ad4372
commit aaa369064c
4 changed files with 19 additions and 9 deletions
+7 -2
View File
@@ -13,9 +13,9 @@
#pragma once
#include <algorithm>
#include "/EgtDev/Include/EgnStringBase.h"
#include "/EgtDev/Include/EgtNumCollection.h"
#include <algorithm>
//----------------------- Macro per import/export -----------------------------
#undef EGN_EXPORT
@@ -60,7 +60,12 @@ inline std::string&
ToLower( std::string& sString)
{ std::transform( sString.begin(), sString.end(), sString.begin(), ::tolower) ;
return sString ; }
inline bool
CompareNoCase( const std::string& sL, const std::string& sR)
{ return ( sL.size() == sR.size() &&
std::equal( sL.cbegin(), sL.cend(), sR.cbegin(),
[]( std::string::value_type cL, std::string::value_type cR)
{ return tolower( cL) == tolower( cR); })) ; }
//----------------------------------------------------------------------------
inline bool
IsEmptyOrSpaces( const std::string& sName)