mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 03:15:40 +02:00
Fixed trim() for single char strings (github #75)
This commit is contained in:
@@ -136,7 +136,7 @@ namespace Catch
|
||||
std::string::size_type start = str.find_first_not_of( "\n\r\t " );
|
||||
std::string::size_type end = str.find_last_not_of( "\n\r\t " );
|
||||
|
||||
return start < end ? str.substr( start, 1+end-start ) : "";
|
||||
return start != std::string::npos ? str.substr( start, 1+end-start ) : "";
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user