/[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.23 by sysadm, Fri Oct 31 06:13:35 2025 UTC Revision 1.24 by sysadm, Fri Oct 31 10:31:55 2025 UTC
# Line 13  function str_length(string $str, bool $s Line 13  function str_length(string $str, bool $s
13                          continue;                          continue;
14                  }                  }
15    
16                  if ($skip_ctrl_seq && $c == "\033" && isset($str[$i + 1]) && $str[$i + 1] == "[") // Skip control sequence                  if ($skip_ctrl_seq && $c == "\033" && $i + 1 < $len && $str[$i + 1] == "[") // Skip control sequence
17                  {                  {
18                          for ($i = $i + 2;                          for ($i = $i + 2;
19                                  isset($str[$i]) && (ctype_digit($str[$i]) || $str[$i] == ';' || $str[$i] == '?');                                  $i < $len && (ctype_digit($str[$i]) || $str[$i] == ';' || $str[$i] == '?');
20                                  $i++)                                  $i++)
21                                  ;                                  ;
22    
23                          if (isset($str[$i]) && $str[$i] == 'm') // valid                          if ($i < $len && $str[$i] == 'm') // valid
24                          {                          {
25                                  // skip                                  // skip
26                          }                          }
27                          else if (isset($str[$i]) && ctype_alpha($str[$i]))                          else if ($i < $len && ctype_alpha($str[$i]))
28                          {                          {
29                                  // unsupported ANSI CSI command                                  // unsupported ANSI CSI command
30                          }                          }


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

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