82 assert(
'is_string($s)');
85 require
'accentalpha_to_alpha.inc';
89 if ($encoding === null) {
92 for ($i = 0; $i < $len; $i++) {
93 $c = mb_substr(
$s, $i, 1);
102 assert(
'is_string($encoding)');
105 $len = mb_strlen(
$s, $encoding);
107 for ($i = 0; $i < $len; $i++) {
108 $c = mb_substr(
$s, $i, 1, $encoding);
157 assert(
'is_string($s)');
158 assert(
'is_bool($strip)');
159 assert(
'is_bool($entity_decode)');
160 assert(
'is_string($replacement)');
163 require
'accentalpha_to_alpha.inc';
164 require
'greek_to_alpha.inc';
170 if ( $entity_decode ) {
171 $s = html_entity_decode(
$s, ENT_COMPAT, mb_internal_encoding());
174 $not_consecutive =
true;
177 if ($encoding === null) {
178 $len = mb_strlen(
$s);
180 for ($i = 0; $i < $len; $i++) {
181 $c = mb_substr(
$s, $i, 1);
183 if (((
'0' <= $c) && ($c <=
'9'))
184 || ((
'A' <= $c) && ($c <=
'Z'))
185 || ((
'a' <= $c) && ($c <=
'z'))) {
187 $not_consecutive =
true;
191 $not_consecutive =
true;
195 $not_consecutive =
true;
197 elseif ($not_consecutive) {
198 $not_consecutive =
false;
199 array_push($a, $replacement);
205 assert(
'is_string($encoding)');
208 $len = mb_strlen(
$s, $encoding);
210 for ($i = 0; $i < $len; $i++) {
211 $c = mb_substr(
$s, $i, 1, $encoding);
213 if (((
'0' <= $c) && ($c <=
'9'))
214 || ((
'A' <= $c) && ($c <=
'Z'))
215 || ((
'a' <= $c) && ($c <=
'z'))) {
217 $not_consecutive =
true;
221 $not_consecutive =
true;
225 $not_consecutive =
true;
227 elseif ($not_consecutive) {
228 $not_consecutive =
false;
229 array_push($a, $replacement);
258 assert(
'is_string($s)');
261 require
'greek_to_alpha.inc';
265 if ($encoding === null) {
266 $len = mb_strlen(
$s);
268 for ($i = 0; $i < $len; $i++) {
269 $c = mb_substr(
$s, $i, 1);
278 assert(
'is_string($encoding)');
281 $len = mb_strlen(
$s, $encoding);
283 for ($i = 0; $i < $len; $i++) {
284 $c = mb_substr(
$s, $i, 1, $encoding);
302 return '03.00.03 --- June 17, 2020';
mb_str_accentalpha_to_alpha($s, $encoding=null)
Copy of $s without "accents".
mb_str_greek_to_alpha($s, $encoding=null)
Copy of $s with the characters of the Greek alphabet were replaced.
version()
Return the version of this module.
mb_str_alphanormalize($s, $strip=false, $entity_decode=false, $replacement='_', $encoding=null)
Copy of $s without "accents" with the characters of the Greek alphabet were replaced and all non-alph...