Skip to content

Dart library to remove/replace diacritics, accents, symbols & confusables from text

License

Notifications You must be signed in to change notification settings

namidaco/string_clean_utils

Repository files navigation

A Dart library to remove/replace diacritics, accents, symbols & confusables from text

Examples Usage

  • Replaces diacritics & accents with original text
    final normalized = StringCleanUtils.normalize('๐’‰๐’‚๐’“๐’๐’†๐’š๐’” ๐’Š๐’ ๐’‰๐’‚๐’˜๐’‚๐’Š๐’Š - ๐’Œ๐’‚๐’•๐’š ๐’‘๐’†๐’“๐’“๐’š');
    print(normalized); // 'harleys in hawaii - katy perry';

    final normalized2 = StringCleanUtils.normalize('๐‘ป๐’‰๐’† โ„š๐•ฆ๐•š๐•”๐•œ ๏ผข๏ฝ’๏ฝ๏ฝ—๏ฝŽ Fox ๐”๐”ฒ๐”ช๐”ญ๐”ข๐”ก โ“žโ“ฅโ“”โ“ก ส‡ษฅว ๐—Ÿ๐—ฎ๐˜‡๐˜† ๐™ณ๐š˜๐š');
    print(normalized2); // 'The Quick Brown Fox Jumped over the Lazy Dog';
  • Remove symbols from text
    final normalized = StringCleanUtils.removeSymbols('The [Quick }Brown Fox %Jumped over ^the Lazy @Dog');
    print(normalized); // 'The Quick Brown Fox Jumped over the Lazy Dog';
  • Remove symbols & whitespaces from text
    final normalized = StringCleanUtils.removeSymbolsAndWhitespaces('The [Quick }Brown Fox %Jumped over ^the Lazy @Dog');
    print(normalized); // 'TheQuickBrownFoxJumpedovertheLazyDog';

Note

About

Dart library to remove/replace diacritics, accents, symbols & confusables from text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages