/**
 * This function takes a string and a character as arguments and returns a substring from the original string.
 * The substring starts from the beginning of the original string and ends when the character is found.
 */
fun getSubstring(string: String, char: Char): String {

    // Initializing an empty string to hold the substring
    var substring = ""

    // Iterating over each character of the string
    var i = 0
    while (i < string.length) {
        // Exiting the loop if the character is found
        if (string[i] == char) {
            break
        }

        // Appending the current character to the substring
        substring += string[i]

        // Incrementing the index
        i++
    }

    return substring
}
/**
 * This function takes a string and a character as arguments and returns a substring from the original string.
 * The substring starts from the beginning of the original string and ends when the character is found.
 */
fun getSubstring(string: String, char: Char): String {
/**
 * This function takes a string and a character as arguments and returns a substring from the original string.
 * The substring starts from the beginning of the original string and ends when the character is found.
 */
fun getSubstring(string: String, char: Char): String {

    // Initializing an empty string to hold the substring
    var substring = ""

    // Iterating over each character of the string
    var i = 0
    while (i < string.length) {
        // Exiting the loop if the character is found
        if (string[i] == char) {
            break
        }

        // Appending the current character to the substring
        substring += string[i]

        // Incrementing the index
        i++
    }

    return substring
}