package com.pixelized.headache.utils.extention

import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import java.util.Locale

@Composable
@Stable
fun String.capitalize() = replaceFirstChar {
    when {
        it.isLowerCase() -> it.titlecase(Locale.getDefault())
        else -> it.toString()
    }
}