Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%SubStr function


Function
The function returns a subtext from the string given by the index of the first character and a the number of characters.
Declaration


Blok kódu
languageesl
themeConfluence
TEXT  %SubStr(
   TEXT in Text, 
   INT in idxFrom, 
   INT in numChars
 )
Parameters


textText string.
idxFromIndex of the first character in text string (from 1...).
numChars
Number

The number of characters in the result string.

Example


Blok kódu
languageesl
themeRDark
%SubStr("some text", 2, 3)      ; returns the following text : "someome"
 
If the value of the parameter idxFrom overruns the string length, the function returns an invalid value. If numChars is greater than admissible number of characters, the text is to will be cut offtruncated:
 


Blok kódu
languageesl
themeRDark
%SubStr("some text", 2, 100)    ; returns the following text : "someome text"