Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

Verzia 1 Aktuálny »

%SubStr function


Function
The function returns a subtext from the string given by the index of the first character and a number of characters.
Declaration
TEXT  %SubStr(
   TEXT in Text, 
   INT in idxFrom, 
   INT in numChars
 )

Parameters
text Text string.
idxFrom Index of the first character in text string (from 1...).
numChars Number of characters in result string.

Example
%SubStr("some text", 2, 3)      ; returns the following text : "some"

 
If the value of the parameter idxFrom overruns the string length, the function returns invalid value. If numChars is greater than admissible number of characters, the text is to be cut off:
 
%SubStr("some text", 2, 100)    ; returns the following text : "some text"

  • Žiadne štítky