This function is used to remove a part of the given string. You supply the input string, the starting position within that string to remove characters from (the index starts at 1) and the number of characters to remove. The function will return a new string without that part in it.
string_delete(str, index, count);
Argument | Type | Description |
---|---|---|
str | String | The string to copy and delete from. |
index | Real | The position of the first character to remove (from 1). |
count | Real | The number of characters to remove. |
str1 = "Helloo World";
str2 = string_delete(str1, 5, 1);
This will set str2 to "Hello World", as it removes the extra "o" from "Hello" (which is present at position 5).