Merge pull request #661 from LeszekSwirski/fix-isupper-locale
Use locale overload of std::isupper
This commit is contained in:
commit
2f9be85b93
@ -21,6 +21,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <algorithm>
|
||||
#include <locale>
|
||||
|
||||
using boost::algorithm::istarts_with;
|
||||
|
||||
@ -29,9 +30,9 @@ namespace YouCompleteMe {
|
||||
namespace {
|
||||
|
||||
char ChangeCharCase( char c ) {
|
||||
if ( std::isupper( c ) )
|
||||
return std::tolower( c );
|
||||
return std::toupper( c );
|
||||
if ( std::isupper( c, std::locale() ) )
|
||||
return std::tolower( c, std::locale() );
|
||||
return std::toupper( c, std::locale() );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user