string_delete(str, index, count);
Argument | Description |
---|---|
str | The string to copy and delete from. |
index | The position of the first character to remove. |
count | The number of characters to remove. |
Returns: String
You can use this function to remove a specific part of a string.
So, you supply the input string and the start and end position
within that string to remove characters (index starts at 1) and the
function will return a new string without that section in it.
str1 = "Helloo World";
str2 = string_delete(str1, 5, 1);
This will set str2 to "Hello World", as it removes the extra "o" from "Hello", ie: the string counts along from the first letter 5 places, then deletes 1 character).