Skip to content

Commit

Permalink
fix substr help (fixes #21192)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2bed7ab)
  • Loading branch information
jef-n authored and nyalldawson committed Feb 7, 2019
1 parent b79e9e6 commit eb8e36c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/function_help/json/substr
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"type": "function",
"description": "Returns a part of a string.",
"arguments": [ {"arg":"string","description":"the full input string"},
{"arg":"start","description":"integer representing start position to extract from; if start is negative, the return string will begin at the end of the string minus the start value"},
{"arg":"start","description":"integer representing start position to extract beginning with 1; if start is negative, the return string will begin at the end of the string minus the start value"},
{"arg":"length","optional":true,"description":"integer representing length of string to extract; if length is negative, the return string will omit the given length of characters from the end of the string"}
],
"examples": [ { "expression":"substr('HELLO WORLD',3,5)", "returns":"'LLO W'"},
{ "expression":"substr('HELLO WORLD',6)", "returns":"'WORLD'"},
{ "expression":"substr('HELLO WORLD',6)", "returns":"' WORLD'"},
{ "expression":"substr('HELLO WORLD',-5)","returns":"'WORLD'"},
{ "expression":"substr('HELLO',3,-1)", "returns":"'LL'"},
{ "expression":"substr('HELLO WORLD',-5,2)","returns":"'WO'"},
Expand Down

0 comments on commit eb8e36c

Please sign in to comment.