Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace boost case conversion routines.
- Loading branch information
1 parent
009787f
commit 4309993
Showing
46 changed files
with
159 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <algorithm> | ||
#include <cctype> | ||
|
||
namespace string | ||
{ | ||
|
||
/** | ||
* Converts the given input string to lowercase, using the | ||
* C-function tolower(). The string is modified in-place. | ||
*/ | ||
inline void to_lower(std::string& input) | ||
{ | ||
std::transform(input.begin(), input.end(), input.begin(), ::tolower); | ||
} | ||
|
||
/** | ||
* Converts the given input string to lowercase, using the | ||
* C-function tolower(), and returns a copy of the result. | ||
*/ | ||
inline std::string to_lower_copy(const std::string& input) | ||
{ | ||
std::string output; | ||
output.resize(input.size()); | ||
|
||
std::transform(input.begin(), input.end(), output.begin(), ::tolower); | ||
|
||
return output; | ||
} | ||
|
||
/** | ||
* Converts the given input string to uppercase, using the | ||
* C-function toupper(). The string is modified in-place. | ||
*/ | ||
inline void to_upper(std::string& input) | ||
{ | ||
std::transform(input.begin(), input.end(), input.begin(), ::toupper); | ||
} | ||
|
||
/** | ||
* Converts the given input string to uppercase, using the | ||
* C-function tolower(), and returns a copy of the result. | ||
*/ | ||
inline std::string to_upper_copy(const std::string& input) | ||
{ | ||
std::string output; | ||
output.resize(input.size()); | ||
|
||
std::transform(input.begin(), input.end(), output.begin(), ::toupper); | ||
|
||
return output; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ | |
|
||
#include "iuimanager.h" | ||
|
||
#include <boost/algorithm/string/case_conv.hpp> | ||
|
||
namespace wxutil | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.