getDecimalSeparator static method

String getDecimalSeparator(
  1. Locale locale
)

Given a locale, return the decimal separator. For example, for en_US it's "." but for pt_BR it's ",".

Implementation

static String getDecimalSeparator(Locale locale) {
  String language = locale.languageCode;
  NumberSymbols? x = numberFormatSymbols[language];
  return x?.DECIMAL_SEP ?? ".";
}