Sfairadora

  • Reference Guide

remove

remove(str, pos, n)
var_str <- remove(pos, n)
The first variant removes n characters form the string str1 at the position pos. The altered string is returned as the result; the parameter str itself remains unchanged. The latter variant removes n characters form the variable (or data item) var_str at the position pos (i.e. it changes the content of var_str). If a negative position or a position beyond the end of the string is specified, an error is returned. If there are less remaining characters than n, all the characters are removed up to the end.

Parameters

str
A value of the type Binary, String, Text, or Rich_string
var_str
L-value of the types Binary, String, Text, Rich_string, or Rich_text
pos
Position from which the characters are to be removed. Type Int. The value 0 denotes the beginning of the string.
n
Number of characters to be remove. Type Int.

Return Value

The first variant returns a string of the same type as the parameter str.
The latter variant returns an l-value denoting var_str.

See Also