update page now

Voting

: min(seven, zero)?
(Example: nine)

The Note You're Voting On

ilaymyhat-rem0ve at yahoo dot com
17 years ago
This might be useful.

<?php
class String{
    
    //Look for a $needle in $haystack in any position
    public static function contains(&$haystack, &$needle, &$offset)
    {
        $result = strpos($haystack, $needle, $offset);
        return $result !== FALSE;
    }
    
    //intuitive implementation .. if not found returns -1.
    public static function strpos(&$haystack, &$needle, &$offset)
    {
        $result = strpos($haystack, $needle, $offset);
        if ($result === FALSE )
        {
            return -1;
        }
        return $result;
    }
    
}//String
?>

<< Back to user notes page

To Top