lib/danog/PHP/StructTools.php
public function stringnot($string)
    {
        foreach (str_split($string) as $key => $char) {
            if ($char == '0') {
                $string[$key] = '1';
            } elseif ($char == '1') {
                $string[$key] = '0';
            } else {
                trigger_error('Found unrecognized char '.$char.' at string offset '.$key);
            }
        }

        return $string;
    }
public function stringnot($string)
    {
        foreach (str_split($string) as $key => $char) {
            if ($char == '0') {
                $string[$key] = '1';
            } elseif ($char == '1') {
                $string[$key] = '0';
            } else {
                trigger_error('Found unrecognized char '.$char.' at string offset '.$key);
            }
        }

        return $string;
    }
stringnot.

Performs a NOT operation on every bit in the string (by bit I mean a literal 1 or 0)

@param	$string String to xor

@return xored string