コード例 #1
0
ファイル: TException.php プロジェクト: irovast/eyedock
 /**
  * @param string $message
  * @param array $args
  * @return string
  */
 protected function replaceMessageToken($message, $args)
 {
     $n = count($args);
     $tokens = array();
     for ($i = 0; $i < $n; ++$i) {
         $tokens['{' . $i . '}'] = (string) $args[$i];
     }
     return strTr($message, $tokens);
 }
コード例 #2
0
ファイル: gs_utf_normal.php プロジェクト: rkania/GS3
function gs_utf8_decompose_to_ascii($str)
{
    static $map = null;
    if (!is_array($map)) {
        $map = _gs_utf8_get_map();
    }
    $str = UtfNormal::toNFD(strTr($str, $map));
    # return "safe" ASCII without control chars, newlines etc.
    //$str = preg_replace('/[^a-z0-9\-_. *#\'"!$()\/]/i', '', $str);
    $str = preg_replace('/[^\\x20-\\x7E]/', '', $str);
    return $str;
}
コード例 #3
0
ファイル: fax_done.php プロジェクト: rkania/GS3
function username_prep($user_name)
{
    return strTr(trim($user_name), array('^' => '', '\\' => '', '>' => '', '<' => '', '\\`' => '', '\'' => '', '"' => ''));
}
コード例 #4
0
ファイル: funcoes.php プロジェクト: vncs2012/wikVinicius
function converterCaracterPM($string)
{
    $texto = ucwords(strtolower($string));
    $filtro = array('Da ' => 'da ', 'Das ' => 'das ', 'De ' => 'de ', 'Dos ' => 'dos ');
    $txt_final = strTr($texto, $filtro);
    return $txt_final;
}