use ToLower() instead of calling std::transform explicitly all the time
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include "misc.h"
|
||||
|
||||
using std::stringstream;
|
||||
@@ -27,6 +28,11 @@ int Abs(int num)
|
||||
return (num < 0 ? -num : num);
|
||||
}
|
||||
|
||||
void ToLower(string &s)
|
||||
{
|
||||
transform(s.begin(), s.end(), s.begin(), tolower);
|
||||
}
|
||||
|
||||
int StrToInt(string str)
|
||||
{
|
||||
return atoi(str.c_str());
|
||||
|
||||
Reference in New Issue
Block a user