Product SiteDocumentation Site

7.4.25. DELSTR (Delete String)


>>-DELSTR(string,n--+---------+--)-----------------------------><
                    +-,length-+

Returns string after deleting the substring that begins at the nth character and is of length characters. If you omit length, or if length is greater than the number of characters from n to the end of string, the function deletes the rest of string (including the nth character). The length must be a positive whole number or zero. n must be a positive whole number. If n is greater than the length of string, the function returns string unchanged.
Here are some examples:

Example 7.37. Builtin function DELSTR

DELSTR("abcd",3)       ->    "ab"
DELSTR("abcde",3,2)    ->    "abe"
DELSTR("abcde",6)      ->    "abcde"