package and depencies
This commit is contained in:
33
vendor/voku/portable-ascii/README.md
vendored
33
vendor/voku/portable-ascii/README.md
vendored
@@ -1,4 +1,6 @@
|
||||
[//]: # (AUTO-GENERATED BY "PHP README Helper": base file -> docs/base.md)
|
||||
[](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
|
||||
|
||||
[](https://github.com/voku/portable-ascii/actions)
|
||||
[](https://ci.appveyor.com/project/voku/portable-ascii/branch/master)
|
||||
[](https://codecov.io/github/voku/portable-ascii?branch=master)
|
||||
@@ -99,8 +101,9 @@ The API from the "ASCII"-Class is written as small static methods.
|
||||
</td></tr><tr><td><a href="#normalize_whitespacestring-str-bool-keepnonbreakingspace-bool-keepbidiunicodecontrols-bool-normalize_control_characters-string">normalize_whitespace</a>
|
||||
</td><td><a href="#remove_invisible_charactersstring-str-bool-url_encoded-string-replacement-bool-keep_basic_control_characters-string">remove_invisible_characters</a>
|
||||
</td><td><a href="#to_asciistring-str-string-language-bool-remove_unsupported_chars-bool-replace_extra_symbols-bool-use_transliterate-boolnull-replace_single_chars_only-string">to_ascii</a>
|
||||
</td><td><a href="#to_filenamestring-str-bool-use_transliterate-string-fallback_char-string">to_filename</a>
|
||||
</td></tr><tr><td><a href="#to_slugifystring-str-string-separator-string-language-string-replacements-bool-replace_extra_symbols-bool-use_str_to_lower-bool-use_transliterate-string">to_slugify</a>
|
||||
</td><td><a href="#to_ascii_remapstring-str1-string-str2-string">to_ascii_remap</a>
|
||||
</td></tr><tr><td><a href="#to_filenamestring-str-bool-use_transliterate-string-fallback_char-string">to_filename</a>
|
||||
</td><td><a href="#to_slugifystring-str-string-separator-string-language-string-replacements-bool-replace_extra_symbols-bool-use_str_to_lower-bool-use_transliterate-string">to_slugify</a>
|
||||
</td><td><a href="#to_transliteratestring-str-stringnull-unknown-bool-strict-string">to_transliterate</a>
|
||||
</td></tr></table>
|
||||
|
||||
@@ -152,7 +155,7 @@ echo $array['orig'][$tmpKey]; // 'ё'
|
||||
</code>
|
||||
|
||||
**Parameters:**
|
||||
- `string $language [optional] <p>Language of the source string e.g.: en, de_at, or de-ch.
|
||||
- `ASCII::* $language [optional] <p>Language of the source string e.g.: en, de_at, or de-ch.
|
||||
(default is 'en') | ASCII::*_LANGUAGE_CODE</p>`
|
||||
- `bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with " pound ".</p>`
|
||||
- `bool $asOrigReplaceArray [optional] <p>TRUE === return {orig: string[], replace: string[]}
|
||||
@@ -308,7 +311,7 @@ ASCII::to_ascii('<27>Düsseldorf<72>', 'en'); // Dusseldorf
|
||||
|
||||
**Parameters:**
|
||||
- `string $str <p>The input string.</p>`
|
||||
- `string $language [optional] <p>Language of the source string.
|
||||
- `ASCII::* $language [optional] <p>Language of the source string.
|
||||
(default is 'en') | ASCII::*_LANGUAGE_CODE</p>`
|
||||
- `bool $remove_unsupported_chars [optional] <p>Whether or not to remove the
|
||||
unsupported characters.</p>`
|
||||
@@ -325,6 +328,26 @@ language</p>`
|
||||
|
||||
--------
|
||||
|
||||
#### to_ascii_remap(string $str1, string $str2): string[]
|
||||
<a href="#voku-php-readme-class-methods">↑</a>
|
||||
WARNING: This method will return broken characters and is only for special cases.
|
||||
|
||||
Convert two UTF-8 encoded string to a single-byte strings suitable for
|
||||
functions that need the same string length after the conversion.
|
||||
|
||||
The function simply uses (and updates) a tailored dynamic encoding
|
||||
(in/out map parameter) where non-ascii characters are remapped to
|
||||
the range [128-255] in order of appearance.
|
||||
|
||||
**Parameters:**
|
||||
- `string $str1`
|
||||
- `string $str2`
|
||||
|
||||
**Return:**
|
||||
- `string[]`
|
||||
|
||||
--------
|
||||
|
||||
#### to_filename(string $str, bool $use_transliterate, string $fallback_char): string
|
||||
<a href="#voku-php-readme-class-methods">↑</a>
|
||||
Convert given string to safe filename (and keep string case).
|
||||
@@ -356,7 +379,7 @@ also be supplied for language-specific transliteration.
|
||||
**Parameters:**
|
||||
- `string $str`
|
||||
- `string $separator [optional] <p>The string used to replace whitespace.</p>`
|
||||
- `string $language [optional] <p>Language of the source string.
|
||||
- `ASCII::* $language [optional] <p>Language of the source string.
|
||||
(default is 'en') | ASCII::*_LANGUAGE_CODE</p>`
|
||||
- `array<string, string> $replacements [optional] <p>A map of replaceable strings.</p>`
|
||||
- `bool $replace_extra_symbols [optional] <p>Add some more replacements e.g. "£" with "
|
||||
|
||||
Reference in New Issue
Block a user