strremove

Deletes a string. (version 4.67 or later)

Format

strremove <strvar> <index> <len>

Remarks

Deletes a specified number <len> of characters from the string variable <strvar> beginning at a specified position <index>(1-origin).

Example

s = '123abc456'
strremove s 4 3  ; '123456'
messagebox s s

s = '123abc456'
strremove s 1 3  ; 'abc456'
messagebox s s

s = '123abc456'
strremove s -1 3 ; Syntax error
messagebox s s

s = '123abc456'
strremove s 0 3  ; Syntax error
messagebox s s

s = '123abc456'
strremove s 9 1  ; '123abc45'
messagebox s s

s = '123abc456'
strremove s 9 2  ; Syntax error
messagebox s s

s = '123abc456'
strremove s 10 1 ; Syntax error
messagebox s s

s = '123abc456'
strremove s 4 0  ; Syntax error
messagebox s s

See also