/**
 * This exercise is about manipulating strings and applying them to a real-life scenario of a graphic designer. The task is to extract the file format and dimensions from a given string that contains a file name and its details.
 *
 * Write a function that takes a string parameter, which will be in the following format: [file_name].[file_format] [width]x[height]. The function should extract the file format, width, and height of the image and return them as a triple.
 *
 * Example:
 * Input:
 * "my_logo.png 1000x500"
 *
 * Output:
 * Triple('png', '1000', '500')
 */
fun graphicDesignerTask(text: String): Triple<String, String, String> {

    // Extracting the file format from the given string
    val fileParts = text.split(" ")
    val fileNameParts = fileParts[0].split(".")
    val fileFormat = fileNameParts.last()

    // Extracting the dimensions from the given string
    val dimensions = fileParts[1].split("x")
    val width = dimensions[0]
    val height = dimensions[1]

    // Returning the extracted file format and dimensions as a triple
    return Triple(fileFormat, width, height)
}
/**
 * This exercise is about manipulating strings and applying them to a real-life scenario of a graphic designer. The task is to extract the file format and dimensions from a given string that contains a file name and its details.
 *
 * Write a function that takes a string parameter, which will be in the following format: [file_name].[file_format] [width]x[height]. The function should extract the file format, width, and height of the image and return them as a triple.
 *
 * Example:
 * Input:
 * "my_logo.png 1000x500"
 *
 * Output:
 * Triple('png', '1000', '500')
 */
fun graphicDesignerTask(text: String): Triple<String, String, String> {
/**
 * This exercise is about manipulating strings and applying them to a real-life scenario of a graphic designer. The task is to extract the file format and dimensions from a given string that contains a file name and its details.
 *
 * Write a function that takes a string parameter, which will be in the following format: [file_name].[file_format] [width]x[height]. The function should extract the file format, width, and height of the image and return them as a triple.
 *
 * Example:
 * Input:
 * "my_logo.png 1000x500"
 *
 * Output:
 * Triple('png', '1000', '500')
 */
fun graphicDesignerTask(text: String): Triple<String, String, String> {

    // Extracting the file format from the given string
    val fileParts = text.split(" ")
    val fileNameParts = fileParts[0].split(".")
    val fileFormat = fileNameParts.last()

    // Extracting the dimensions from the given string
    val dimensions = fileParts[1].split("x")
    val width = dimensions[0]
    val height = dimensions[1]

    // Returning the extracted file format and dimensions as a triple
    return Triple(fileFormat, width, height)
}