Changed comment. It used to plain wrong.
[squirrelmail.git] / functions / strings.php
index 902cdf861616e533b53d7cde826daeba3880ce3e..84663b53506dc06c93e07b19e0b3ffbcb4a2ac24 100644 (file)
       return $data;
    }
 
+   // Searches for the next position in a string minus white space
+   function next_pos_minus_white ($haystack, $pos) {
+      while (substr($haystack, $pos, 1) == " " ||
+             substr($haystack, $pos, 1) == "\t" ||
+             substr($haystack, $pos, 1) == "\n" ||
+             substr($haystack, $pos, 1) == "\r") {
+         if ($pos >= strlen($haystack))
+            return -1;
+         $pos++;
+      }        
+      return $pos;        
+   }
+
    // Wraps text at $wrap characters
    function wordWrap($passed, $wrap) {
       $passed = str_replace(">", ">", $passed);