mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#1776 CSV data parser. Remove double spaces in column names
This commit is contained in:
1 parent
660b6a6430
commit
8f5c3436ce
3 files changed
+21
-2
No files matched your search
@@ -39,3 +39,20 @@ bool RiaTextStringTools::compare(const QString& expected, const QString& actual)
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaTextStringTools::trimAndRemoveDoubleSpaces(const QString& s)
|
||||
{
|
||||
int length;
|
||||
QString trimmed = s.trimmed();
|
||||
|
||||
do
|
||||
{
|
||||
length = trimmed.size();
|
||||
trimmed = trimmed.replace(" ", " ");
|
||||
} while (trimmed.size() < length);
|
||||
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user