/**
 * Find the index of a given character in a string.
 *
 * @param string The string to search for the given character.
 * @param character The character to find the index of in the string.
 * @return The index of the given character in the string.
 *
 * Example:
 * val string = "Hello world!"
 * Given the string, the index of the character 'o' is 4.
 */
fun index(string: String, character: Char): Int {

    return string.indexOf(character)
}

// Usage example
val string = "Hello world!"
val index = index(string, 'o')
/**
 * Find the index of a given character in a string.
 *
 * @param string The string to search for the given character.
 * @param character The character to find the index of in the string.
 * @return The index of the given character in the string.
 *
 * Example:
 * val string = "Hello world!"
 * Given the string, the index of the character 'o' is 4.
 */
fun index(string: String, character: Char): Int {
/**
 * Find the index of a given character in a string.
 *
 * @param string The string to search for the given character.
 * @param character The character to find the index of in the string.
 * @return The index of the given character in the string.
 *
 * Example:
 * val string = "Hello world!"
 * Given the string, the index of the character 'o' is 4.
 */
fun index(string: String, character: Char): Int {

    return string.indexOf(character)
}

// Usage example
val string = "Hello world!"
val index = index(string, 'o')