DOKK / manpages / debian 11 / libnetsds-util-perl / NetSDS::Util::Convert.3pm.en
NetSDS::Util::Convert(3pm) User Contributed Perl Documentation NetSDS::Util::Convert(3pm)

NetSDS::Util::Convert - data formats conversion functions

        use NetSDS::Util::Convert qw(...);

"NetSDS::Util::Convert" module contains miscelaneous functions.

  • CLI parameters processing
  • types validation
  • HEX, Base64, URI, BCD encondig
  • UUID processing

This function converts string to little-endian BCD encoding filled with F16 value.
        $hex = conv_chr_hex('a'); # return 61
    
        $chr = conv_hex_chr('4A'); # return 'J'
    
        $str = 'Want hex dump!';
        $hex = conv_hex_str($str);
        print "Hex string: " . $hex;
    
        $hex = '7A686F7061';
        $string = conv_hex_str($hex);
        print "String from hex: " . $string;
    
        my $b64 = str_base64("Hallo, people!");
    
        my $str = base64_str($base64_string);
    
Example:

        my $uri = str_uri("http://www.google.com/?q=what");
    
Example:

        my $str = uri_str($uri_string);
    

None

None

1. Add other encodings support

Pod::Usage, Data::UUID

Valentyn Solomko <pere@pere.org.ua>

Michael Bochkaryov <misha@rattler.kiev.ua>

2019-02-22 perl v5.28.1