mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Better help for format function
Added description of what syntax/parsing engine is used for the formatting. Motivated by https://github.com/qgis/QGIS/issues/42806, but in general a good idea so users can look up more in detail what is possible. Also uniformized spelling (placeholder vs placeholder).
This commit is contained in:
parent
f5449a1fe9
commit
2fed93cdfd
@ -4,10 +4,10 @@
|
|||||||
"groups": ["String"],
|
"groups": ["String"],
|
||||||
"description": "Format a string using supplied arguments.",
|
"description": "Format a string using supplied arguments.",
|
||||||
"variableLenArguments": true,
|
"variableLenArguments": true,
|
||||||
"arguments": [ {"arg":"string", "description":"A string with place holders for the arguments. Use %1, %2, etc for placeholders. Placeholders can be repeated."},
|
"arguments": [ {"arg":"string", "description":"A string with placeholders %1, %2, etc., for the arguments. Placeholders can be repeated. The lowest numbered placeholder is replaced by arg1, the next by arg2, etc."},
|
||||||
{"arg":"arg1", "syntaxOnly": true},
|
{"arg":"arg1", "syntaxOnly": true},
|
||||||
{"arg":"arg2", "syntaxOnly": true},
|
{"arg":"arg2", "syntaxOnly": true},
|
||||||
{"arg":"arg", "descOnly": true, "description":"any type. Any number of arguments."}],
|
{"arg":"arg", "descOnly": true, "description":"any type. Any number of arguments."}],
|
||||||
"examples": [ { "expression":"format('This %1 a %2','is', 'test')", "returns":"'This is a test'"}
|
"examples": [ { "expression":"format('This %1 a %2','is', 'test')", "returns":"'This is a test'"},
|
||||||
]
|
{ "expression":"format('This is %2','a bit unexpected but 2 is lowest number in string','normal')", "returns":"'This is a bit unexpected but 2 is lowest number in string'"} ]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user