alphanormalize_php  v.03.00.03 — June 17, 2020
Alphanormalize Namespace Reference

Functions

 mb_str_accentalpha_to_alpha ($s, $encoding=null)
 Copy of $s without "accents". More...
 
 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-alphanumeric characters are replaced by $replacement. More...
 
 mb_str_greek_to_alpha ($s, $encoding=null)
 Copy of $s with the characters of the Greek alphabet were replaced. More...
 
 version ()
 Return the version of this module. More...
 

Variables

return true
 

Function Documentation

◆ mb_str_accentalpha_to_alpha()

Alphanormalize\mb_str_accentalpha_to_alpha (   $s,
  $encoding = null 
)

Copy of $s without "accents".

Returns a copy of which $s "accented" characters were converted by removing their "accent" (the converted characters are those of the associative table $ACCENTALPHA_TO_ALPHA from accentalpha_to_alpha.inc file).

For example: 'Élément' => 'Element'.

If $encoding === null then use the internal character encoding.

Parameters
string$s
null | string$encoding
Returns
string

Definition at line 80 of file alphanormalize.inc.

References $ACCENTALPHA_TO_ALPHA, and $s.

◆ mb_str_alphanormalize()

Alphanormalize\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-alphanumeric characters are replaced by $replacement.

Returns a copy of $s:

  • each "accented" characters is converted by removing its "accent" (the converted characters are those of the associative table $ACCENTALPHA_TO_ALPHA from accentalpha_to_alpha.inc file) ;
  • each characters of the Greek alphabet is converted to alphabetic characters (the converted characters are those of the associative table $GREEK_TO_ALPHA from greek_to_alpha.inc file) ;
  • each group of other characters is replaced by $replacement.

For example: 'Élément ; α and ω.' => 'Element_a_and_o_'.

Adopts the standard ONU/ELOT: see http://www.opimedia.be/DS/mementos/grecs.htm .

If $strip then begins delete HTML tags.

If $entity_decode then begins convert HTML entities to normal characters. (Previous PHP 5.4, all HTML entities are not supported!)

If $encoding === null then use the internal character encoding.

Parameters
string$s
bool$strip
bool$entity_decode
string$replacement
null | string$encoding
Returns
string

Definition at line 155 of file alphanormalize.inc.

References $ACCENTALPHA_TO_ALPHA, $GREEK_TO_ALPHA, and $s.

◆ mb_str_greek_to_alpha()

Alphanormalize\mb_str_greek_to_alpha (   $s,
  $encoding = null 
)

Copy of $s with the characters of the Greek alphabet were replaced.

Returns a copy of $s with the characters of the Greek alphabet were converted to alphabetic characters (the converted characters are those of the associative table $GREEK_TO_ALPHA from greek_to_alpha.inc file).

Adopts the standard ONU/ELOT: see http://www.opimedia.be/DS/mementos/grecs.htm .

For example: 'α and ω' => 'a and o'.

If $encoding === null then use the internal character encoding.

Parameters
string$s
null | string$encoding
Returns
string

Definition at line 256 of file alphanormalize.inc.

References $GREEK_TO_ALPHA, and $s.

◆ version()

Alphanormalize\version ( )

Return the version of this module.

Returns
string

Definition at line 301 of file alphanormalize.inc.

Variable Documentation

◆ true

return Alphanormalize\true

Definition at line 306 of file alphanormalize.inc.