/[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.13 by sysadm, Fri Mar 28 10:31:26 2025 UTC Revision 1.14 by sysadm, Fri Apr 4 03:01:37 2025 UTC
# Line 1  Line 1 
1  <?  <?
2  function str_length($str)  function str_length(string $str) : string
3  {  {
4          $len = strlen($str);          $len = strlen($str);
5          $ret = 0;          $ret = 0;
# Line 32  function str_length($str) Line 32  function str_length($str)
32          return $ret;          return $ret;
33  }  }
34    
35  function split_line($str, $prefix = "", $width = 76, $lines_limit = PHP_INT_MAX, $end_of_line = "\n")  function split_line(string $str, string $prefix = "", int $width = 76, int $lines_limit = PHP_INT_MAX, string $end_of_line = "\n") : string
36  {  {
37          if ($width <= 0)          if ($width <= 0)
38            {
39                  return $str;                  return $str;
40            }
41                    
42          $result = "";          $result = "";
43          $len = strlen($str);          $len = strlen($str);


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

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