NetSDS...Convert(3pm)
π NetSDS::Util::Convert β the manual page, but make it cute π
okay bestie, welcome to NetSDS...Convert(3pm), straight out of the User Contributed Perl Documentation collection. pull up a chair, grab a boba, we're gonna talk about converting data formats. it's giving utility module excellence, fr fr. π§β¨
β¨ NAME β¨
NetSDS::Util::Convert β data formats conversion functions π
πΈ SYNOPSIS πΈ
use NetSDS::Util::Convert qw(...);
that's it. that's the whole vibe check. import whatever you need, bestie. π
π¦ DESCRIPTION π¦
so NetSDS::Util::Convert is a module full of miscelaneous functions (yes, the typo is canon, we don't fix canon π). it's your little grab-bag of helpers, and here's what's inside:
- CLI parameters processing
- types validation
- HEX, Base64, URI, BCD encondig
- UUID processing
like. it does a lot. main character energy for real. π
π₯ EXPORTED FUNCTIONS π₯
here's the lineup, one by one, no skips, no skipsies:
π conv_conv_str_bcd($str) β convert string to little-endian BCD
this one converts a string to little-endian BCD encoding, filled with F16 value. that's the whole thing. it's a bop. π
π conv_chr_hex($char) β encode char to hexadecimal string
$hex = conv_chr_hex('a'); # return 61
one char in, one hex out. iconic. β¨
π conv_hex_chr($hex) β convert hexadecimal string to character
$chr = conv_hex_chr('4A'); # return 'J'
the reverse situation. still slaying. π
π conv_str_hex($str) β convert byte string to hexadecimal
$str = 'Want hex dump!';
$hex = conv_hex_str($str);
print "Hex string: " . $hex;
(and yes, bestie, the example literally calls conv_hex_str β we copy the manpage verbatim around here, no cap. π)
π conv_hex_str($string) β convert hex to byte string
$hex = '7A686F7061';
$string = conv_hex_str($hex);
print "String from hex: " . $string;
hex goes in, actual readable string comes out. the glow-up is real. π
π conv_str_base64($str) β convert string to Base64
my $b64 = str_base64("Hallo, people!");
π conv_base64_str($b64) β convert Base64 to string
my $str = base64_str($base64_string);
base64 round trip, we love to see it. π«Ά
π conv_str_uri($str) β convert string to URI encoded
Example:
my $uri = str_uri("http://www.google.com/?q=what");
π conv_uri_str($uri) β decode URI encoded string
Example:
my $str = uri_str($uri_string);
and that's the whole roster. all of them exported, all of them ready to work. π
π EXAMPLES π
None
literally nothing here bestie, the examples live up in the functions themselves. we make do. π
π BUGS π
None
zero bugs. not one. we are simply that girl. (do not investigate further, just trust the manpage π)
β TODO β
- Add other encodings support
that's the whole list. one item. we're manifesting it. β¨
π SEE ALSO π
Pod::UsageData::UUID
go read those too, iykyk. π
πΈ AUTHORS πΈ
- Valentyn Solomko
<pere@pere.org.ua> - Michael Bochkaryov
<misha@rattler.kiev.ua>
thank you for your service, legends. π«‘π
and that's a wrap on NetSDS...Convert(3pm), bestie! this lil page was rendered with perl v5.36.0 and dated 2022-11-20 β vintage, but she still eats. periodt. π
β¨π
π¦ where this page comes from
- debian bookworm: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- debian trixie: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu noble: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu questing: libnetsds-util-perl 1.045-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms