public static function getString(&$str)
    {
        $p = strpos($str, "\x00");
        if ($p === false) {
            return '';
        }
        $r   = static::binarySubstr($str, 0, $p);
        $str = static::binarySubstr($str, $p + 1);

        return $r;
    }
public static function getString(&$str)
    {
        $p = strpos($str, "\x00");
        if ($p === false) {
            return '';
        }
        $r   = static::binarySubstr($str, 0, $p);
        $str = static::binarySubstr($str, $p + 1);

        return $r;
    }
public static function getString ( & $ str ) { $ p = strpos ( $ str , "\x00" ) ; if ( $ p === false ) { return '' ; } $ r = static :: binarySubstr ( $ str , 0 , $ p ) ; $ str = static :: binarySubstr ( $ str , $ p + 1 ) ; return $ r ; }
Parse null-terminated string.

@param &string $str
@return string
Parse null - terminated string .