NFePHP\Extras\Danfce::str2Hex PHP Method

str2Hex() protected static method

str2Hex Converte string para haxadecimal ASCII
protected static str2Hex ( string $str ) : string
$str string
return string
    protected static function str2Hex($str)
    {
        if ($str == '') {
            return '';
        }
        $hex = "";
        $iCount = 0;
        do {
            $hex .= sprintf("%02x", ord($str[$iCount]));
            $iCount++;
        } while ($iCount < strlen($str));
        return $hex;
    }