/[LeafOK_CVS]/fenglin/lib/str_process.inc.php
ViewVC logotype

Diff of /fenglin/lib/str_process.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 by sysadm, Mon Jun 28 22:55:35 2004 UTC Revision 1.7 by sysadm, Wed Mar 23 17:31:14 2005 UTC
# Line 48  function str_process($str,$prefix="",$wi Line 48  function str_process($str,$prefix="",$wi
48                    
49          $lines = explode("\n",str_replace("\r\n","\n",$str));          $lines = explode("\n",str_replace("\r\n","\n",$str));
50    
51          foreach($lines as $line)          foreach($lines as $tmp => $line)
52          {          {
53                  $result .= split_line($line,$prefix,$width);                  $result .= split_line($line,$prefix,$width);
54          }          }
# Line 56  function str_process($str,$prefix="",$wi Line 56  function str_process($str,$prefix="",$wi
56          return $result;          return $result;
57  }  }
58    
59    function str_b_lines($str,$max_line=1)
60    {
61            $result = "";
62            $l = 0;
63            $lines = explode("\n",str_replace("\r\n","\n",$str));
64            foreach($lines as $tmp => $line)
65            {
66                    $result .= ($line."\r\n");
67                    $l += (strlen($line)/256 + 1);
68                    if ($l >= $max_line)
69                            break;
70            }
71    
72            return $result;
73    }
74    
75  ?>  ?>


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1