Beispiel #1
0
function addChClass(&$table, $chars, $class)
{
    foreach ($chars as $ch) {
        $ord = Qevix::ord($ch);
        $table[$ord] = (isset($table[$ord]) ? $table[$ord] : 0) | $class;
    }
}
Beispiel #2
0
function addChClass(&$table, $chars, $class, $add = false)
{
    foreach ($chars as $ch) {
        $ord = Qevix::ord($ch);
        if (!$add or !isset($table[$ord])) {
            $table[$ord] = $class;
        } else {
            $table[$ord] = (isset($table[$ord]) ? $table[$ord] : 0) | $class;
        }
    }
}