From 3cfee81259cc6b747a99a9437dcabae83a869b90 Mon Sep 17 00:00:00 2001 From: "Mathieu Pellerin (nirvn)" Date: Mon, 17 Feb 2014 11:44:21 +0700 Subject: [PATCH] [expression] add wordwrap function help file --- resources/function_help/wordwrap | 15 +++++++++++++++ src/core/qgsexpression.cpp | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 resources/function_help/wordwrap diff --git a/resources/function_help/wordwrap b/resources/function_help/wordwrap new file mode 100644 index 00000000000..2179dff7b91 --- /dev/null +++ b/resources/function_help/wordwrap @@ -0,0 +1,15 @@ +

wordwrap() function

+Returns a string wrapped to a minimum number of characters. + +

Syntax

+ replace(string,delimiter_string,minimum_characters)

+ +

Arguments

+ + string → is string. The string to be wrapped.
+ delimiter_string → is string. The delimiter character(s) to break to a new line.
+ minimum_characters → is number. The minimum number of characters required to allow for break to a new line

+ +

Example

+ + wordwrap('UNIVERSITY OF QGIS',' ',3) → 'UNIVERSITY\nOF QGIS'

diff --git a/src/core/qgsexpression.cpp b/src/core/qgsexpression.cpp index b833834ad3c..047d15a33a1 100644 --- a/src/core/qgsexpression.cpp +++ b/src/core/qgsexpression.cpp @@ -1452,7 +1452,7 @@ const QStringList &QgsExpression::BuiltinFunctions() << "coalesce" << "regexp_match" << "$now" << "age" << "year" << "month" << "week" << "day" << "hour" << "minute" << "second" << "lower" << "upper" - << "title" << "length" << "replace" << "trim" + << "title" << "length" << "replace" << "trim" << "wordwrap" << "regexp_replace" << "regexp_substr" << "substr" << "concat" << "strpos" << "left" << "right" << "rpad" << "lpad"