mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RiaStdStringTools: Add method for removing white space
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user