Skip to content

Commit 191fb22

Browse files
committed
Resolved merge conflicts
2 parents 39a039d + 898604d commit 191fb22

File tree

13 files changed

+174
-73
lines changed

13 files changed

+174
-73
lines changed
1.99 KB
Loading

resources/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ ADD_SUBDIRECTORY(context_help)
55
ADD_SUBDIRECTORY(js)
66
ADD_SUBDIRECTORY(html)
77
ADD_SUBDIRECTORY(css)
8+
ADD_SUBDIRECTORY(function_help)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FILE(GLOB HELP_FILES *-*)
2+
3+
INSTALL(FILES ${HELP_FILES} DESTINATION ${QGIS_DATA_DIR}/resources/function_help)
4+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>length() function</h3>
2+
Returns the length of a string.
3+
4+
<p><h4>Syntax</h4>
5+
length(<i>string</i>)</p>
6+
7+
<p><h4>Arguments</h4>
8+
<!-- List args for functions here-->
9+
<i> string</i> -> is string. The String to count the length of.</p>
10+
11+
<p><h4>Example</h4>
12+
<!-- Show example of function.-->
13+
length('HELLO') -> 5</p>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h3>lower() function</h3>
2+
Converts a string to lower case letters.
3+
4+
<p><h4> Syntax</h4>
5+
lower(<i>string</i>)</p>
6+
7+
<p><h4> Arguments</h4>
8+
<i> string</i> -> is string. The String to convert to lower case.</p>
9+
10+
<p><h4> Example</h4>
11+
lower('HELLO World') -> 'hello world'</p>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h3>replace() function</h3>
2+
Returns a string with the the supplied string replaced.
3+
4+
<p><h4>Syntax</h4>
5+
replace(<i>string,before,after</i>)</p>
6+
7+
<p><h4>Arguments</h4>
8+
<!-- List args for functions here-->
9+
<i> string</i> -> is string. The start string.<br>
10+
<i> before</i> -> is string. The string to replace.<br>
11+
<i> after</i> -> is string. The string that will repalce <i>before</i><br></p>
12+
13+
<p><h4>Example</h4>
14+
<!-- Show example of function.-->
15+
replace('QGIS SHOULD ROCK','SHOULD','DOES') -> 'QGIS DOES ROCK'</p>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h3>substr() function</h3>
2+
Return a part of a string
3+
4+
<p><h4>Syntax</h4>
5+
substr(<i>string,startpos,length</i>)</p>
6+
7+
<p><h4>Arguments</h4>
8+
<!-- List args for functions here-->
9+
<i> string</i> -> is string. The full string.<br>
10+
<i> startpos</i> -> is number. The start position to extract from.<br>
11+
<i> length</i> -> is number. The length of the string to extract.<br></p>
12+
13+
<p><h4>Example</h4>
14+
<!-- Show example of function.-->
15+
substr('HELLO WORLD',3,5) -> 'LLO W'</p>

resources/function_help/template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>{function} function</h3>
2+
Converts a string to lower case letters.
3+
4+
<p><h4>Syntax</h4>
5+
lower(<i>args</i>)</p>
6+
7+
<p><h4>Arguments</h4>
8+
<!-- List args for functions here-->
9+
<i> string</i> -> is string. The String to convert to lower case.</p>
10+
11+
<p><h4>Example</h4>
12+
<!-- Show example of function.-->
13+
lower('HELLO World') -> 'hello world'</p>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h3>upper() function</h3>
2+
Converts a string to upper case letters.
3+
4+
<p><h4>Syntax</h4>
5+
upper(<i>string</i>)</p>
6+
7+
<p><h4>Arguments</h4>
8+
<!-- List args for functions here-->
9+
<i> string</i> -> is string. The String to convert to upper case.</p>
10+
11+
<p><h4>Example</h4>
12+
<!-- Show example of function.-->
13+
upper('hello WOrld') -> 'HELLO WORLD'</p>

src/core/qgsexpression.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,10 @@ FnDef QgsExpression::BuiltinFunctions[] =
392392
FnDef( "toreal", 1, fcnToReal, "Conversions" ),
393393
FnDef( "tostring", 1, fcnToString, "Conversions" ),
394394
// string manipulation
395-
FnDef( "lower", 1, fcnLower, "String", "<b>Convert to lower case</b> "
396-
"<br> Converts a string to lower case letters. "
397-
"<br> <i>Usage:</i><br>lower('HELLO WORLD') will return 'hello world'" ),
398-
FnDef( "upper", 1, fcnUpper, "String" , "<b>Convert to upper case</b> "
399-
"<br> Converts a string to upper case letters. "
400-
"<br> <i>Usage:</i><br>upper('hello world') will return 'HELLO WORLD'" ),
401-
FnDef( "length", 1, fcnLength, "String", "<b>Length of string</b> "
402-
"<br> Returns the legnth of a string. "
403-
"<br> <i>Usage:</i><br>length('hello') will return 5" ),
404-
FnDef( "replace", 3, fcnReplace, "String", "<b>Replace a section of a string.</b> " ),
395+
FnDef( "lower", 1, fcnLower, "String"),
396+
FnDef( "upper", 1, fcnUpper, "String"),
397+
FnDef( "length", 1, fcnLength, "String"),
398+
FnDef( "replace", 3, fcnReplace, "String"),
405399
FnDef( "regexp_replace", 3, fcnRegexpReplace, "String" ),
406400
FnDef( "substr", 3, fcnSubstr, "String" ),
407401
// geometry accessors

0 commit comments

Comments
 (0)