Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-24235 bennu: remove dependency on mbstring from library

  • Loading branch information...
commit be90ed23b50babd2a7e952134f6f40d115f45bbc 1 parent 5bbf3cb
@mackensen mackensen authored
Showing with 5 additions and 4 deletions.
  1. +4 −4 lib/bennu/iCalendar_rfc2445.php
  2. +1 −0  lib/bennu/readme_moodle.txt
View
8 lib/bennu/iCalendar_rfc2445.php
@@ -56,7 +56,7 @@
function rfc2445_fold($string) {
- if(mb_strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
+ if(textlib::strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
return $string;
}
@@ -66,15 +66,15 @@ function rfc2445_fold($string) {
$len_count=0;
//multi-byte string, get the correct length
- $section_len = mb_strlen($string, 'utf-8');
+ $section_len = textlib::strlen($string, 'utf-8');
while($len_count<$section_len) {
//get the current portion of the line
- $section = mb_substr($string, ($i * RFC2445_FOLDED_LINE_LENGTH), (RFC2445_FOLDED_LINE_LENGTH), 'utf-8');
+ $section = textlib::substr($string, ($i * RFC2445_FOLDED_LINE_LENGTH), (RFC2445_FOLDED_LINE_LENGTH), 'utf-8');
//increment the length we've processed by the length of the new portion
- $len_count += mb_strlen($section, 'utf-8');
+ $len_count += textlib::strlen($section, 'utf-8');
/* Add the portion to the return value, terminating with CRLF.HTAB
As per RFC 2445, CRLF.HTAB will be replaced by the processor of the
View
1  lib/bennu/readme_moodle.txt
@@ -2,3 +2,4 @@ Description of Bennu library import - customised library by author, this version
modifications:
1/ removed ereg functions deprecated as of php 5.3 (18 Nov 2009)
+2/ replaced mbstring functions with moodle textlib (28 Nov 2011)
Please sign in to comment.
Something went wrong with that request. Please try again.