"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "go/core/util/StringUtil.php" between
groupoffice-6.3.62-php-71.tar.gz and groupoffice-6.3.63-php-71.tar.gz

About: GroupOffice is a web-based office suit: Calendar, CRM, E-mail, File sharing, Projects, Synchronization (6.3 series for PHP 7.1; community version).

StringUtil.php  (groupoffice-6.3.62-php-71):StringUtil.php  (groupoffice-6.3.63-php-71)
skipping to change at line 31 skipping to change at line 31
* *
* @param string $text * @param string $text
* @param string $crlf * @param string $crlf
* @param string * @param string
*/ */
public static function normalizeCrlf($text, $crlf = "\r\n") { public static function normalizeCrlf($text, $crlf = "\r\n") {
$text = str_replace("\r", "", $text); $text = str_replace("\r", "", $text);
return $crlf != "\n" ? str_replace("\n", $crlf, $text) : $text; return $crlf != "\n" ? str_replace("\n", $crlf, $text) : $text;
} }
public static function normalize($text) {
return \Normalizer::normalize($text, \Normalizer::FORM_C);
}
public static function isNormalized($text) {
return \Normalizer::isNormalized($text, \Normalizer::FORM_C);
}
/** /**
* Converts any "CamelCased" into an "underscored_word". * Converts any "CamelCased" into an "underscored_word".
* @param string $camelCasedString the word(s) to underscore * @param string $camelCasedString the word(s) to underscore
* @param string * @param string
*/ */
public static function camelCaseToUnderscore($camelCasedString) { public static function camelCaseToUnderscore($camelCasedString) {
return strtolower(preg_replace('/(?<=\\w)([A-Z][a-z])/', '_\\1', $camelCasedString)); return strtolower(preg_replace('/(?<=\\w)([A-Z][a-z])/', '_\\1', $camelCasedString));
} }
/** /**
skipping to change at line 568 skipping to change at line 576
* 1. Accepted delimiters: white spaces (space, tab, new line etc.) and c ommas. * 1. Accepted delimiters: white spaces (space, tab, new line etc.) and c ommas.
* *
* 2. You can use either simple (') or double (") quotes for expressions which contains more than one word. * 2. You can use either simple (') or double (") quotes for expressions which contains more than one word.
* *
* @param string $expression * @param string $expression
* @return string[] * @return string[]
*/ */
public static function explodeSearchExpression($expression) { public static function explodeSearchExpression($expression) {
return preg_split("/[\s,]*\\\"([^\\\"]+)\\\"[\s,]*|" . "[\s,]*'([ ^']+)'[\s,]*|" . "[\s,]+/", $expression, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DEL IM_CAPTURE); return preg_split("/[\s,]*\\\"([^\\\"]+)\\\"[\s,]*|" . "[\s,]*'([ ^']+)'[\s,]*|" . "[\s,]+/", $expression, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DEL IM_CAPTURE);
} }
public static function debugUTF8($str) {
$ord = "";
for ( $pos=0, $l = strlen($str); $pos < $l; $pos ++ ) {
$byte = substr($str, $pos);
$ord .= " U+" . ord($byte);
}
return $ord;
}
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)