API / Minn\Support / Accents

Accents final class

Minn\Support\Accents · public/minn/src/Minn/Support/Accents.php · 35 lines

Accented and special characters to their plain spelling, from the reference's own table (data/accents.json, captured with tests/tools/accents-capture.php): text is put in composed form first, a locale with spellings of its own (German, Danish, Catalan, Serbian, Bosnian) has them, and a string that is not UTF-8 is read as Latin-1. Anything the table does not name stays as it is.

Uses 1
Used by 1

Constants and properties

privatestatic ?array $data

Public

staticstrip(string $text, string $locale = ''): string#

The text with its accented characters spelled plainly, as the locale spells them.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatedata(): array#
@return array{table: array<string, string>, locales: array<string, array<string, string>>, latin1: array<string, string>}