Browse Source

Optimization:
Function next_pos_minus_white is not used into SM core, not SM official
plugins. It's code will go into a "not currently in use" repository".

philippe_mingo 23 năm trước cách đây
mục cha
commit
9d8c238c5d
1 tập tin đã thay đổi với 0 bổ sung24 xóa
  1. 0 24
      functions/strings.php

+ 0 - 24
functions/strings.php

@@ -36,30 +36,6 @@ function readShortMailboxName($haystack, $needle) {
     return( $elem );
 }
 
-
-
-/**
- * Returns the index of the first chunk of string $haystack that
- * starts with non-white-space character, starting at position $pos.
- * If there is no such chunk, returns -1.
- */
-function next_pos_minus_white ($haystack, $pos) {
-    $len = strlen($haystack);
-    while ($pos < $len) {
-        /* Get the next character. */
-        $c = substr($haystack, $pos, 1);
-        
-        /* Check the next character. */
-        if (($c != ' ') && ($c != "\t") && ($c != "\n") && ($c != "\r")) {
-            return $pos;
-        }
-
-        /* Increment position in string. */
-        ++$pos;
-    }
-    return -1;
-}
-
 /**
  * Wraps text at $wrap characters
  *