summaryrefslogtreecommitdiff
path: root/includes/unicode.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-01-15 07:14:14 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-01-15 07:14:14 +0000
commit2e9bbda79198879adba89eda98e4a4867d9d3cd9 (patch)
tree3aebddf5e83e94737c5891978c5443c3ccae77c2 /includes/unicode.inc
parent3329ad927c93b86587ec6ef3b7804ddcf1948384 (diff)
downloadbrdo-2e9bbda79198879adba89eda98e4a4867d9d3cd9.tar.gz
brdo-2e9bbda79198879adba89eda98e4a4867d9d3cd9.tar.bz2
- #44772: {} -> [] (in anticipation of PHP de-deprecation)
Diffstat (limited to 'includes/unicode.inc')
-rw-r--r--includes/unicode.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/unicode.inc b/includes/unicode.inc
index f0e302343..7aa0b942a 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -193,12 +193,12 @@ function truncate_utf8($string, $len, $wordsafe = FALSE, $dots = FALSE) {
return $string;
}
if ($wordsafe) {
- while (($string{--$len} != ' ') && ($len > 0)) {};
+ while (($string[--$len] != ' ') && ($len > 0)) {};
}
- if ((ord($string{$len}) < 0x80) || (ord($string{$len}) >= 0xC0)) {
+ if ((ord($string[$len]) < 0x80) || (ord($string[$len]) >= 0xC0)) {
return substr($string, 0, $len) . ($dots ? ' ...' : '');
}
- while (ord($string{--$len}) < 0xC0) {};
+ while (ord($string[--$len]) < 0xC0) {};
return substr($string, 0, $len) . ($dots ? ' ...' : '');
}
@@ -389,7 +389,7 @@ function drupal_strtolower($text) {
* Used for flipping U+C0-U+DE to U+E0-U+FD and back.
*/
function _unicode_caseflip($matches) {
- return $matches[0]{0} . chr(ord($matches[0]{1}) ^ 32);
+ return $matches[0][0] . chr(ord($matches[0][1]) ^ 32);
}
/**
@@ -422,7 +422,7 @@ function drupal_substr($text, $start, $length = NULL) {
$bytes = -1; $chars = -1;
while ($bytes < $strlen && $chars < $start) {
$bytes++;
- $c = ord($text{$bytes});
+ $c = ord($text[$bytes]);
if ($c < 0x80 || $c >= 0xC0) {
$chars++;
}
@@ -435,7 +435,7 @@ function drupal_substr($text, $start, $length = NULL) {
$bytes = $strlen; $chars = 0;
while ($bytes > 0 && $chars < $start) {
$bytes--;
- $c = ord($text{$bytes});
+ $c = ord($text[$bytes]);
if ($c < 0x80 || $c >= 0xC0) {
$chars++;
}
@@ -453,7 +453,7 @@ function drupal_substr($text, $start, $length = NULL) {
$bytes = $istart; $chars = 0;
while ($bytes < $strlen && $chars < $length) {
$bytes++;
- $c = ord($text{$bytes});
+ $c = ord($text[$bytes]);
if ($c < 0x80 || $c >= 0xC0) {
$chars++;
}
@@ -466,7 +466,7 @@ function drupal_substr($text, $start, $length = NULL) {
$length = abs($length);
$bytes = $strlen - 1; $chars = 0;
while ($bytes >= 0 && $chars < $length) {
- $c = ord($text{$bytes});
+ $c = ord($text[$bytes]);
if ($c < 0x80 || $c >= 0xC0) {
$chars++;
}