mirror of
https://github.com/catchorg/Catch2.git
synced 2025-07-10 02:55:32 +02:00
Added <cctype> and std::tolower
This commit is contained in:
parent
7ae2f08fa5
commit
8472c109a7
3
include/external/clara.h
vendored
3
include/external/clara.h
vendored
@ -35,6 +35,7 @@
|
||||
#define TBC_TEXT_FORMAT_H_INCLUDED
|
||||
#endif
|
||||
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
@ -232,7 +233,7 @@ namespace Clara {
|
||||
}
|
||||
inline void convertInto( std::string const& _source, bool& _dest ) {
|
||||
std::string sourceLC = _source;
|
||||
std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), ::tolower );
|
||||
std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), std::tolower );
|
||||
if( sourceLC == "y" || sourceLC == "1" || sourceLC == "true" || sourceLC == "yes" || sourceLC == "on" )
|
||||
_dest = true;
|
||||
else if( sourceLC == "n" || sourceLC == "0" || sourceLC == "false" || sourceLC == "no" || sourceLC == "off" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user