Changeset 2302


Ignore:
Timestamp:
Jul 24, 2010, 4:51:45 AM (11 years ago)
Author:
Peter
Message:

using boost function in to_lower and to_upper to make them respect the locale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/stl_utility.cc

    r2119 r2302  
    55  Copyright (C) 2006 Jari Häkkinen
    66  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     7  Copyright (C) 2010 Peter Johansson
    78
    89  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2425#include "stl_utility.h"
    2526
    26 #include <algorithm>
     27#include <boost/algorithm/string/case_conv.hpp>
     28
    2729#include <string>
    2830
     
    3335  std::string& to_lower(std::string& s)
    3436  {
    35     transform(s.begin(),s.end(), s.begin(), tolower);
     37    boost::to_lower(s);
    3638    return s;
    3739  }
     
    4042  std::string& to_upper(std::string& s)
    4143  {
    42     transform(s.begin(),s.end(), s.begin(), toupper);
     44    boost::to_upper(s);
    4345    return s;
    4446  }
Note: See TracChangeset for help on using the changeset viewer.