21 protected $_aUmls = array(
"\344",
"\366",
"\374",
"\304",
"\326",
"\334",
"\337");
28 protected $_aUmlEntities = array(
'ä',
'ö',
'ü',
'Ä',
'Ö',
'Ü',
'ß');
60 public function substr($sStr, $iStart, $iLength = null)
62 if (is_null($iLength)) {
63 return substr($sStr, $iStart);
65 return substr($sStr, $iStart, $iLength);
78 public function strpos($sHaystack, $sNeedle, $iOffset = null)
81 if ($sHaystack && $sNeedle) {
82 if (is_null($iOffset)) {
83 $iPos =
strpos($sHaystack, $sNeedle);
85 $iPos =
strpos($sHaystack, $sNeedle, $iOffset);
100 public function strstr($sHaystack, $sNeedle)
102 return strstr($sHaystack, $sNeedle);
152 return htmlentities($sString, $iQuotStyle, $this->_sEncoding);
178 public function preg_split($sPattern, $sString, $iLimit = -1, $iFlag = 0)
180 return preg_split($sPattern, $sString, $iLimit, $iFlag);
194 public function preg_replace($sPattern, $sString, $sSubject, $iLimit = -1, $iCount = null)
196 return preg_replace($sPattern, $sString, $sSubject, $iLimit, $iCount);
226 public function preg_match($sPattern, $sSubject, &$aMatches = null, $iFlags = null, $iOffset = null)
228 return preg_match($sPattern, $sSubject, $aMatches, $iFlags, $iOffset);
242 public function preg_match_all($sPattern, $sSubject, &$aMatches = null, $iFlags = null, $iOffset = null)
244 return preg_match_all($sPattern, $sSubject, $aMatches, $iFlags, $iOffset);
258 return $sString . $this->
substr($sSubject, 1);
271 public function wordwrap($sString, $iLength = 75, $sBreak =
"\n", $blCut = null)
273 return wordwrap($sString, $iLength, $sBreak, $blCut);
288 public function recodeEntities($sInput, $blToHtmlEntities =
false, $aUmls = array(), $aUmlEntities = array())
290 $aUmls = (count($aUmls) > 0) ? array_merge($this->_aUmls, $aUmls) :
$this->_aUmls;
291 $aUmlEntities = (count($aUmlEntities) > 0) ? array_merge($this->_aUmlEntities, $aUmlEntities) :
$this->_aUmlEntities;
293 return $blToHtmlEntities ? str_replace($aUmls, $aUmlEntities, $sInput) : str_replace($aUmlEntities, $aUmls, $sInput);
305 return $this->
preg_match(
"/(" . implode(
"|", $this->_aUmls) .
"|(&))/", $sStr);
319 return $this->
preg_replace(
"/\n|\r|\t|\x95|\xa0|;/", $sCleanChr, $sStr);
331 if (is_array($data)) {
336 while ($blNumerical && (list($key) = each($data))) {
337 $blNumerical = !is_string($key);
340 return '[' . implode(
',', array_map(array($this,
'jsonEncode'), $data)) .
']';
342 foreach ($data as $key => $val) {
348 $ret .=
'"' . addslashes($key) .
'":' . $this->
jsonEncode($val);
351 return "{" . $ret .
"}";
354 return '"' . addcslashes((
string) $data,
"\r\n\t\"\\") .
'"';
368 if (stripos($sAllowableTags,
'<style>') ===
false) {
370 $sString = $this->
preg_replace(
"'<style[^>]*>.*</style>'siU",
'', $sString);
387 return -strcmp($sStr1, $sStr2);