mirror of
https://github.com/qgis/QGIS.git
synced 2025-07-05 00:03:33 -04:00
Allows using a string argument for the reverse function, which returns a reversed version of the string
31 lines
974 B
Plaintext
31 lines
974 B
Plaintext
{
|
|
"name": "reverse",
|
|
"type": "function",
|
|
"groups": ["String", "GeometryGroup"],
|
|
"description": "Reverses the direction of a line string or reverses a string of text.",
|
|
"variants": [{
|
|
"variant": "String variant",
|
|
"variant_description": "Reverses the order of characters in a string.",
|
|
"arguments": [{
|
|
"arg": "string",
|
|
"description": "string to reverse"
|
|
}],
|
|
"examples": [{
|
|
"expression": "reverse('hello')",
|
|
"returns": "'olleh'"
|
|
}]
|
|
}, {
|
|
"variant": "Geometry variant",
|
|
"variant_description": "Reverses the direction of a line string by reversing the order of its vertices.",
|
|
"arguments": [{
|
|
"arg": "geometry",
|
|
"description": "a geometry"
|
|
}],
|
|
"examples": [{
|
|
"expression": "geom_to_wkt(reverse(geom_from_wkt('LINESTRING(0 0, 1 1, 2 2)')))",
|
|
"returns": "'LINESTRING(2 2, 1 1, 0 0)'"
|
|
}]
|
|
}],
|
|
"tags": ["direction", "order", "vertices", "reverses", "line", "reversing"]
|
|
}
|