mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-06 02:49:31 -06:00
utils enhanced splitStringByWidth()
Split a word only if there is more than 30% free space on the line. - reordered parameters, non-const references first - extracted logic to function
This commit is contained in:
@@ -96,8 +96,8 @@ namespace Orm::Utils
|
||||
|
||||
/*! Split a string by the given width (with or w/o splitting words preference). */
|
||||
static QStringList
|
||||
splitStringByWidth(QStringView string, int width,
|
||||
SplitWordsBehavior splitBehavior = cNeverSplitWords);
|
||||
splitStringByWidth(QStringView string, int maxWidth,
|
||||
SplitWordsBehavior splitBehavior = cSplitWords30);
|
||||
/*! Split a string view at the first given character. */
|
||||
static QList<QStringView>
|
||||
splitAtFirst(QStringView string, QChar separator,
|
||||
|
||||
Reference in New Issue
Block a user