Replaces accented characters with their character without the accent.

```php
\bbn\x::dump(\bbn\str::remove_accents("TÃ¨st FÃ¬lÃ¨ Ã²Ã¨Ã Ã¹è"));
// (string) "TA¨st  FA¬lA¨  A²A¨A A¹e"
```

@param string $st The string.
@return string
164673
public static function remove_accents($st): string
  {
    $st = trim(mb_ereg_replace('&(.)(tilde|circ|grave|acute|uml|ring|oelig);', '\\1', self::cast($st)));
    $search = explode(",","ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u,ą,ń,ł,ź,ę,À,Á,Â,Ã,Ä,Ç,È,É,Ê,Ë,Ì,Í,Î,Ï,Ñ,Ò,Ó,Ô,Õ,Ö,Ù,Ú,Û,Ü,Ý,Ł,Ś");
    $replace = explode(",","c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u,a,n,l,z,e,A,A,A,A,A,C,E,E,E,E,I,I,I,I,N,O,O,O,O,O,U,U,U,U,Y,L,S");
    foreach ( $search as $i => $s )
      $st = mb_ereg_replace($s, $replace[$i], $st);
    return $st;
  }
1213095
public static function strip($str)
    {
        $ascii = '';
        for($i=0; $i<strlen($str); $i++){
            if(ord($str{$i}) <128){
                $ascii .= $str{$i};
            }
        }
        return $ascii;
    }
774607
protected function latinizeDigits($str) {
		$result = '';
		$num = new \NumberFormatter($this->locale, \NumberFormatter::DECIMAL);
		preg_match_all('/.[\x80-\xBF]*/', $str, $matches);
		foreach ($matches[0] as $char) {
			$pos = 0;
			$parsedChar = $num->parse($char, \NumberFormatter::TYPE_INT32, $pos);
			$result .= $pos ? $parsedChar : $char;
		}
		return $result;
	}
1099682
public static function translate($text)
    {
        foreach (Config::get('smiley.db_smileys') as $key => $value) {
            $div = "<div class='fst_sml $value'></div>";
            $text = str_replace($key, $div, $text);
        }

        foreach (Config::get('smiley.smileys') as $key => $value) {
            $div = "<div class='fst_sml $value'></div>";
            $text = str_replace($key, $div, $text);
        }
        //
        return $text;
    }
514188
public static function removeMacrons($str)
    {
        if ( !preg_match('/[\x80-\xff]/', $str) ) {
            return $str;
        }

        $chars = array(
            // Some romanization system may use circumflex accent rather than macron
            chr(195).chr(130) => 'A', chr(195).chr(162) => 'a',
            chr(195).chr(142) => 'I', chr(195).chr(174) => 'i',
            chr(195).chr(155) => 'U', chr(195).chr(187) => 'u',
            chr(195).chr(138) => 'E', chr(195).chr(170) => 'e',
            chr(195).chr(148) => 'O', chr(195).chr(180) => 'o',
            // Macrons
            chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',
            chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',
            chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',
            chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',
            chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',
        );

        return strtr($str, $chars);
    }
1253006
public static function normalizeNewLines(string $s): string
    {
        if (\strpos($s, "\r") === false) {
            return $s;
        }

        return \str_replace(["\r\n", "\r"], "\n", $s);
    }
128159
public static function fixEncoding(string $s): string
    {
        // removes xD800-xDFFF, x110000 and higher
        return \htmlspecialchars_decode(\htmlspecialchars($s, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8'), ENT_NOQUOTES);
    }
186785
public function clean_string($str)
    {
        if ($this->is_ascii($str) === FALSE) {
            if (MB_ENABLED) {
                $str = mb_convert_encoding($str, 'UTF-8', 'UTF-8');
            } elseif (ICONV_ENABLED) {
                $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str);
            }
        }

        return $str;
    }
658420
public static function trad2simp($str) {
    if (empty($str)) {
      throw new Exception('Argument str cannot be empty');
    }
    $ords = self::utf8ToUnicode($str);
    foreach ($ords as $k => $val) {
      if ($val !== false && array_key_exists($val, self::$trad2simple)) {
        $ords[$k] = self::$trad2simple[$val];
      }
      else {
        $ords[$k] = $val;
      }
    }
    return self::unicodeToUtf8($ords);
  }
1333340
public static function translitStringToAscii($str) {
        $LATV=array("ā","Ā","č","Č","ē","Ē","ģ","Ģ","ī","Ī","ķ","Ķ","ļ","Ļ","ņ","Ņ","š","Š","ū","Ū","ž","Ž",".",'"',"   ","-","_","/"); //Latviešu garie un mīkste burti un neatļautie simboli
        $LATIN=array("a","A","c","C","e","E","g","G","i","I","k","K","l","L","n","N","s","S","u","U","z","Z","",""," ",""," "," "); //Latviešu mīksto un garo burtu un neatļauto simbolu aizstāēji
        return str_replace($LATV,$LATIN,$str); //Latviešu garos un mīkstos burtus aizstāj ar latīņu burtiem
        //$str = str_replace(array('й','ц','у','к','е','н','г','ш','щ','з','х','ъ','ф','ы','в','а','п','р','о','л','д','ж','э','я','ч','с','м','и','т','ь','б','ю','Й','Ц','У','К','Е','Н','Г','Ш','Щ','З','Х','Ъ','Ф','Ы','В','А','П','Р','О','Л','Д','Ж','Э','Я','Ч','С','М','И','Т','Ь','Б','Ю','Ā','Č','Ē','Ģ','Ī','Ķ','Ļ','Ņ','Š','Ū','Ž', 'ā','č','ē','ģ','ī','ķ','ļ','ņ','š','ū','ž'),array('A','C','E','G','I','K','L','N','S','U','Z','a','c','e','g','i','k','l','n','s','u','z','i','c','u','k','e','n','g','sh','sh','z','h','i','f','i','v','a','p','r','o','l','d','zh','e','ja','ch','s','m','i','t','','b','ju','I','C','U','K','E','N','G','SH','SH','Z','H','I','F','I','V','A','P','R','O','L','D','ZH','E','JA','CH','S','M','I','T','','B','JU','A','C','E','G','I','K','L','N','S','U','Z','a','c','e','g','i','k','l','n','s','u','z'),$str);
	return $str;
}
711487
public static function accent(String $str) : String
    {
        $accent = array_merge(Config::get('Expressions', 'accentChars') ?: [], self::$accentChars);

        $accent = Datatype::multikey($accent);

        return str_replace(array_keys($accent), array_values($accent), $str);
    }
652793
private function _out_string_encoding( &$str )
     {
        $rsc = $this->_source_result_charset();
        if( $rsc==1 ) {
            $rsstr = iconv(UCS2, 'utf-8', $str);
        }
        else if( $rsc==2 ) {
            $rsstr = iconv('utf-8', 'gb18030', iconv(UCS2, 'utf-8', $str) );
        }
        else{
            $rsstr = iconv('utf-8', 'big5', iconv(UCS2, 'utf-8', $str) );
        }
        return $rsstr;
     }
143911
private function _toUTF8($str)
    {
        $str = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', ' ', $str)); //remove nonprintable characters
        if ($this->_encoding != null) {
            if (strcasecmp($this->_encoding, "UTF-8") == 0) {
                return $str;
            } elseif (strcasecmp($this->_encoding, "CP437") == 0) {
                $strr = "";
                if (($strl = strlen($str)) > 0) for ($i = 0; $i < $strl; $i++) {
                    $strc = substr($str, $i, 1);
                    if ($strc < 128) $strr.=$strc;
                        else $strr.=self::$_CP437toUTF8Table[$strc-128];
                }

                 return $strr;
            } else {
                if (preg_match("/^windows-\d+ \((.+)\)$/", $this->_encoding, $buf)) {
                    $encoding = $buf[1];
                } else {
                    $encoding = $this->_encoding;
                }
                $enclist = mb_list_encodings();
                if (in_array($encoding, $enclist)) {
                    return mb_convert_encoding($str, 'UTF-8', $encoding);
                } elseif (function_exists("iconv")) {
                    if (($iconvout=iconv($encoding, 'UTF-8', $str))!==false) {
                        return $iconvout;
                    } else {
                        return mb_convert_encoding($str, 'UTF-8');
                    }
                } elseif (function_exists("libiconv") && (($iconvout=libiconv($encoding, 'UTF-8', $str))!==false)) {
                    return $iconvout;
                } else {
                    return mb_convert_encoding($str, 'UTF-8');
                }
           }
        } else {
            return mb_convert_encoding($str, 'UTF-8');
        }
    }
926755
public static function stripMicrosoftChars($str)
    {

        $chars=array(

            chr(133) => '...', //dot dot dot elipsis
            chr(145) => "'", //curly left single quotes
            chr(146) => "'", //curly right single quotes
            chr(147) => '"', //curly left double quotes
            chr(148) => '"', //curly right double quotes
            chr(149) => '*', //bullet char
            chr(150) => '-', //en dash
            chr(151) => '-', //em dash,

            //mac word roman charset
            chr(165) => '*', //bullet char
            chr(201) => '...', //elipsis
            chr(208) => '-', //en-dash
            chr(209) => '-', //em-dash
            chr(210) => '"', //curly left double quotes
            chr(211) => '"', //curly right double quotes
            chr(212) => '\'', //curly left single quote
            chr(213) => '\'', //curly right single quotes

        );

        return strtr($str, $chars);
    }
414882
String unescapeString(String st) {

        StringBuilder sb = new StringBuilder(st.length());

        for (int i = 0; i < st.length(); i++) {
            char ch = st.charAt(i);
            if (ch == '\\') {
                char nextChar = (i == st.length() - 1) ? '\\' : st.charAt(i + 1);
                switch (nextChar) {
                case '\\':
                    ch = '\\';
                    break;
                case 'b':
                    ch = '\b';
                    break;
                case 'f':
                    ch = '\f';
                    break;
                case 'n':
                    ch = '\n';
                    break;
                case 'r':
                    ch = '\r';
                    break;
                case 't':
                    ch = '\t';
                    break;
                /*case '\"':
                    ch = '\"';
                    break;
                case '\'':
                    ch = '\'';
                    break;*/
                // Hex Unicode: u????
                case 'u':
                    if (i >= st.length() - 5) {
                        ch = 'u';
                        break;
                    }
                    int code = Integer.parseInt(
                            "" + st.charAt(i + 2) + st.charAt(i + 3) + st.charAt(i + 4) + st.charAt(i + 5), 16);
                    sb.append(Character.toChars(code));
                    i += 5;
                    continue;
                }
                i++;
            }
            sb.append(ch);
        }
        return sb.toString();
    }
776995
private static function str_replace($s,$r,$str)
    {
        if(!is_array($s)){
            $s = '!'.preg_quote($s,'!').'!u';
        }else{
            foreach ($s as $k => $v) {
                $s[$k] = '!'.preg_quote($v).'!u';
            }
        }
        return preg_replace($s,$r,$str);
    }
1186481
public function transliterate($str) {

      $str = self::preTransliterate($str);

      // Workflow:
      //  1/ Default characters
      //  2/ Sokuon
      //  3/ Choonpu

      $str = self::transliterateDefaultCharacters($str, $this->mapping);

      $str = self::transliterateSokuon($str);

      $str = self::transliterateChoonpu($str, $this->macrons);

      return self::postTransliterate($str);
    }