OSDN Git Service

mb_substrの第3引数を省略したときの実装が間違っていた
authorarino <arino>
Sun, 16 Nov 2003 13:28:06 +0000 (22:28 +0900)
committerarino <arino>
Sun, 16 Nov 2003 13:28:06 +0000 (22:28 +0900)
mbstring.php

index c59cb01..091eb92 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: mbstring.php,v 1.6 2003/08/08 07:29:56 arino Exp $
+// $Id: mbstring.php,v 1.7 2003/11/16 13:28:06 arino Exp $
 //
 
 /*
@@ -214,6 +214,6 @@ function mb_strlen($str,$encoding='')
 function mb_substr($str,$start,$length=0,$encoding='')
 {
        // Ãí: EUC-JPÀìÍÑ, $encoding¤ò»ÈÍѤ·¤Ê¤¤
-       return jsubstr($str,$start,$length);
+       return jsubstr($str,$start,($length == 0) ? jstrlen($str) : $length);
 }
 ?>