#1776 CSV data parser. Remove double spaces in column names

This commit is contained in:
Bjørn Erik Jensen committed 2018-05-23 12:33:26 +02:00
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;
}