Skip to content
Browse files

MDL-24235 bennu: Converted to old style of textlib strlen

  • Loading branch information...
1 parent fc69741 commit 0080f86fb74f4b36ba0bde3f0d40e90c3e850b50 Sam Hemelryk committed Mar 5, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/bennu/iCalendar_rfc2445.php
View
9 lib/bennu/iCalendar_rfc2445.php
@@ -56,7 +56,8 @@
function rfc2445_fold($string) {
- if(textlib::strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
+ $textlib = textlib_get_instance();
+ if($textlib->strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
return $string;
}
@@ -66,15 +67,15 @@ function rfc2445_fold($string) {
$len_count=0;
//multi-byte string, get the correct length
- $section_len = textlib::strlen($string, 'utf-8');
+ $section_len = $textlib->strlen($string, 'utf-8');
while($len_count<$section_len) {
//get the current portion of the line
- $section = textlib::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 += textlib::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

0 comments on commit 0080f86

Please sign in to comment.
Something went wrong with that request. Please try again.