/**
 * Given the total cost of a room decoration project and the area of the room, calculate the price per square meter.
 * Assume that the total cost is a string formatted as 'XXXXX.XX USD' and the room area is a float in square meters with 2 decimal places.
 * Return the price per square meter as a string formatted as 'XXXXX.XX USD/m²'.
 *
 * @param totalCost The total cost of the room decoration project in the format 'XXXXX.XX USD'.
 * @param roomArea The area of the room in square meters (e.g., 12.34).
 * @return The price per square meter formatted as 'XXXXX.XX USD/m²'.
 */
fun calculateSquareMeterPrice(totalCost: String, roomArea: Float): String {

    // Extract the cost value from the totalCost string
    val costValue = totalCost.split(" ")[0].toFloat()

    // Calculate the price per square meter
    val pricePerSquareMeter = costValue / roomArea

    // Format the price per square meter with 2 decimal places and 'USD/m²' string
    val formattedPrice = String.format("%.2f USD/m²", pricePerSquareMeter)

    return formattedPrice
}
/**
 * Given the total cost of a room decoration project and the area of the room, calculate the price per square meter.
 * Assume that the total cost is a string formatted as 'XXXXX.XX USD' and the room area is a float in square meters with 2 decimal places.
 * Return the price per square meter as a string formatted as 'XXXXX.XX USD/m²'.
 *
 * @param totalCost The total cost of the room decoration project in the format 'XXXXX.XX USD'.
 * @param roomArea The area of the room in square meters (e.g., 12.34).
 * @return The price per square meter formatted as 'XXXXX.XX USD/m²'.
 */
fun calculateSquareMeterPrice(totalCost: String, roomArea: Float): String {
/**
 * Given the total cost of a room decoration project and the area of the room, calculate the price per square meter.
 * Assume that the total cost is a string formatted as 'XXXXX.XX USD' and the room area is a float in square meters with 2 decimal places.
 * Return the price per square meter as a string formatted as 'XXXXX.XX USD/m²'.
 *
 * @param totalCost The total cost of the room decoration project in the format 'XXXXX.XX USD'.
 * @param roomArea The area of the room in square meters (e.g., 12.34).
 * @return The price per square meter formatted as 'XXXXX.XX USD/m²'.
 */
fun calculateSquareMeterPrice(totalCost: String, roomArea: Float): String {

    // Extract the cost value from the totalCost string
    val costValue = totalCost.split(" ")[0].toFloat()

    // Calculate the price per square meter
    val pricePerSquareMeter = costValue / roomArea

    // Format the price per square meter with 2 decimal places and 'USD/m²' string
    val formattedPrice = String.format("%.2f USD/m²", pricePerSquareMeter)

    return formattedPrice
}