/**
 * Given a string 'string' and an index 'index', remove the character at the specified index.
 *
 * @param string The input string.
 * @param index The index at which the character needs to be removed.
 * @return The string 'string' with the character at 'index' removed.
 */
fun removeCharacter(string: String, index: Int): String {

    if (index < 0 || index >= string.length) {
        return string
    }
    return string.substring(0, index) + string.substring(index + 1)
}
/**
 * Given a string 'string' and an index 'index', remove the character at the specified index.
 *
 * @param string The input string.
 * @param index The index at which the character needs to be removed.
 * @return The string 'string' with the character at 'index' removed.
 */
fun removeCharacter(string: String, index: Int): String {
/**
 * Given a string 'string' and an index 'index', remove the character at the specified index.
 *
 * @param string The input string.
 * @param index The index at which the character needs to be removed.
 * @return The string 'string' with the character at 'index' removed.
 */
fun removeCharacter(string: String, index: Int): String {

    if (index < 0 || index >= string.length) {
        return string
    }
    return string.substring(0, index) + string.substring(index + 1)
}