latinize function Null safety

String latinize(
  1. String text,
  2. [Map<String, String> extendedSymbolTable = const <String, String>{}]
)

Dart library for converting accent characters.

Import this library as follows:

import 'package:latinize/latinize.dart';

An expression-capable dice roller.

Simple usage:

  latinize('ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů'); // => 'ExAmPlE aeiouycdenrstzu

Parses a text and convert accents (diacritics) from strings to latin characters.

Implementation

/// An expression-capable dice roller.
///
/// Simple usage:
/// ```
///   latinize('ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů'); // => 'ExAmPlE aeiouycdenrstzu
/// ```

/// Parses a text and convert accents (diacritics)
/// from strings to latin characters.
String latinize(
  String text, [
  Map<String, String> extendedSymbolTable = const <String, String>{},
]) =>
    text
        .split('')
        .map((String character) =>
            extendedSymbolTable[character] ??
            _symbolTable[character] ??
            character)
        .join();