Mercurial > hg > svcore
diff base/StringBits.h @ 1835:804dd0c06f0e
Merge from branch sensible-delimited-data-strings
author | Chris Cannam |
---|---|
date | Mon, 06 Apr 2020 13:55:44 +0100 |
parents | 21c792334c2e |
children | 91056142abd0 |
line wrap: on
line diff
--- a/base/StringBits.h Fri Apr 03 12:12:02 2020 +0100 +++ b/base/StringBits.h Mon Apr 06 13:55:44 2020 +0100 @@ -55,6 +55,16 @@ * analogous to the behaviour of splitQuoted). */ static QStringList split(QString s, QChar separator, bool quoted); + + /** + * Join a vector of strings into a single string, with the + * delimiter as the joining string. If a string contains the + * delimiter already, quote it with double-quotes, replacing any + * existing double-quotes within it by a pair of double-quotes, as + * specified in RFC 4180 Common Format and MIME Type for + * Comma-Separated Values (CSV) Files. + */ + static QString joinDelimited(QVector<QString> row, QString delimiter); }; #endif