RiaStdStringTools: Add method for removing white space

This commit is contained in:
Kristian Bendiksen
2023-08-21 10:53:06 +02:00
parent 76b8e69029
commit 14c37c4b2c
3 changed files with 33 additions and 0 deletions

View File

@@ -52,6 +52,16 @@ std::string RiaStdStringTools::trimString( const std::string& s )
return rightTrimString( leftTrimString( s ) );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RiaStdStringTools::removeWhitespace( const std::string& line )
{
std::string s = line;
s.erase( std::remove_if( s.begin(), s.end(), isspace ), s.end() );
return s;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------