mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 18:15:42 +02:00
refactored toLower
This commit is contained in:
@@ -80,9 +80,14 @@ namespace Catch {
|
||||
inline bool contains( const std::string& s, const std::string& infix ) {
|
||||
return s.find( infix ) != std::string::npos;
|
||||
}
|
||||
inline void toLower( std::string& s ) {
|
||||
inline void toLowerInPlace( std::string& s ) {
|
||||
std::transform( s.begin(), s.end(), s.begin(), ::tolower );
|
||||
}
|
||||
inline std::string toLower( std::string const& s ) {
|
||||
std::string lc = s;
|
||||
toLowerInPlace( lc );
|
||||
return lc;
|
||||
}
|
||||
|
||||
struct pluralise {
|
||||
pluralise( std::size_t count, const std::string& label )
|
||||
|
Reference in New Issue
Block a user