aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/voku/portable-ascii/README.md
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
commit5e5f0aa955d86743a14531bed98501b59140ab1f (patch)
treef8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/voku/portable-ascii/README.md
parentf9a4c53e3feb07e5319b110b25b4746ae839c420 (diff)
downloadvolse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip
update composer libs
Diffstat (limited to 'vendor/voku/portable-ascii/README.md')
-rw-r--r--vendor/voku/portable-ascii/README.md33
1 files changed, 28 insertions, 5 deletions
diff --git a/vendor/voku/portable-ascii/README.md b/vendor/voku/portable-ascii/README.md
index 929c21e29..3ce36d604 100644
--- a/vendor/voku/portable-ascii/README.md
+++ b/vendor/voku/portable-ascii/README.md
@@ -1,4 +1,6 @@
[//]: # (AUTO-GENERATED BY "PHP README Helper": base file -> docs/base.md)
+[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
+
[![Build Status](https://github.com/voku/portable-ascii/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/portable-ascii/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-ascii/branch/master)
[![codecov.io](https://codecov.io/github/voku/portable-ascii/coverage.svg?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('�Düsseldorf�', '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 "