Skip to content

Commit

Permalink
[expression] add wordwrap function help file
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Feb 21, 2014
1 parent 1fcb4f0 commit 3cfee81
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions resources/function_help/wordwrap
@@ -0,0 +1,15 @@
<h3>wordwrap() function</h3>
Returns a string wrapped to a minimum number of characters.

<p><h4>Syntax</h4>
replace(<i>string,delimiter_string,minimum_characters</i>)</p>

<p><h4>Arguments</h4>
<!-- List args for functions here-->
<i> string</i> &rarr; is string. The string to be wrapped.<br>
<i> delimiter_string</i> &rarr; is string. The delimiter character(s) to break to a new line.<br>
<i> minimum_characters</i> &rarr; is number. The minimum number of characters required to allow for break to a new line<br></p>

<p><h4>Example</h4>
<!-- Show example of function.-->
wordwrap('UNIVERSITY OF QGIS',' ',3) &rarr; 'UNIVERSITY\nOF QGIS'</p>
2 changes: 1 addition & 1 deletion src/core/qgsexpression.cpp
Expand Up @@ -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"
Expand Down

0 comments on commit 3cfee81

Please sign in to comment.