Skip to content

Instantly share code, notes, and snippets.

@varantes
Last active September 20, 2018 15:12
Show Gist options
  • Save varantes/839e53fc4d6b02d91bc766a78267e97a to your computer and use it in GitHub Desktop.
Save varantes/839e53fc4d6b02d91bc766a78267e97a to your computer and use it in GitHub Desktop.
Prints a number formatted to Brazil
val f = 3.14
println("Locale.getDefault() = ${Locale.getDefault()}; f=$f")
val brasilNumberFormatter = NumberFormat.getNumberInstance(Locale("pt", "br"));
println("Locale.getDefault() = ${Locale.getDefault()}; f=${brasilNumberFormatter.format(f)}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment