strremove

文字列を削除する。

形式

strremove <strvar> <index> <len>

解説

文字列変数 <strvar> の <index> 位置(1オリジン)から <len> 文字分を削除し詰める。

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 ; シンタックスエラー
messagebox s s

s = '123abc456'
strremove s 0 3  ; シンタックスエラー
messagebox s s

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

s = '123abc456'
strremove s 9 2  ; シンタックスエラー
messagebox s s

s = '123abc456'
strremove s 10 1 ; シンタックスエラー
messagebox s s

s = '123abc456'
strremove s 4 0  ; シンタックスエラー
messagebox s s

参照

strmatch
strreplace
strinsert