toCurrency

fun String.toCurrency(locale: Locale = Locale.getDefault(), useDot: Boolean = false): String

Function to convert String to formatted String as currency

Return

formatted String as currency

Receiver

String

Parameters

locale

Locale to define which Currency to use to format the String

useDot

used to replace , with . in the String