Subversion Repositories PHPX

Rev

Rev 2 | Rev 22 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 13
Line 431... Line 431...
431
  return preg_replace_callback('/[\\x00-\\x7F]/',
431
  return preg_replace_callback('/[\\x00-\\x7F]/',
432
    create_function('$m', "return $f(0, 1)" . '? $m[0] : "&#" . ord($m[0]) . ";";'),
432
    create_function('$m', "return $f(0, 1)" . '? $m[0] : "&#" . ord($m[0]) . ";";'),
433
    $s);
433
    $s);
434
}
434
}
435
435
-
 
436
/**
-
 
437
 * Reduces sequences of two or more consecutive white-space characters
-
 
438
 * in an input to a single space.
-
 
439
 *
-
 
440
 * @param string $s
-
 
441
 * @return string
-
 
442
 */
-
 
443
function reduceWhitespace($s)
-
 
444
{
-
 
445
  return preg_replace('/\s{2,}/', ' ', $s);
-
 
446
}
-
 
447
436
?>
448
?>
437
449