String::Parity(3pm)
π String::Parity π
okay so bestie, welcome to String::Parity β it's a User Contributed Perl Documentation situation, and it's literally all about parity (odd / even / mark / space) handling functions. that's the whole vibe. π¦
β¨ NAME β¨
String::Parity β parity (odd/even/mark/space) handling functions π
πΈ SYNOPSIS πΈ
use String::Parity;
use String::Parity qw(:DEFAULT /show/);
π DESCRIPTION π
okay so here's the whole friend group, one by one, no skips, we're not leaving anybody out:
setEvenParity LISTβ copies the elements ofLISTto a new list and converts the new elements to strings of bytes with even parity. in array context it returns the new list. in scalar context it joins the elements of the new list into a single string and returns the string. both valid, both iconic. β¨setOddParity LISTβ likesetEvenParityfunction, but converts to strings with odd parity. same energy, different bit. πsetSpaceParity LISTβ likesetEvenParityfunction, but converts to strings with space parity (High bit cleared). clearing bits, clearing vibes. π§setMarkParity LISTβ likesetEvenParityfunction, but converts to strings with mark parity (High bit set). setting bits, setting trends. π₯EvenBytes LISTβ returns the number of even parity bytes in the elements ofLIST. a whole count. a census. πOddBytes LISTβ returns the number of odd parity bytes in the elements ofLIST. π¦SpaceBytes LISTβ returns the number of space parity bytes in the elements ofLIST. βMarkBytes LISTβ returns the number of mark parity bytes in the elements ofLIST. πisEvenParity LISTβ returns TRUE if theLISTcontains no byte with odd parity, FALSE otherwise. it's giving "is anybody here chaotic?" πisOddParity LISTβ returns TRUE if theLISTcontains no byte with even parity, FALSE otherwise. πisSpaceParity LISTβ returns TRUE if theLISTcontains no byte with mark parity, FALSE otherwise. πisMarkParity LISTβ returns TRUE if theLISTcontains no byte with space parity, FALSE otherwise. πshowParity LISTβ likesetEvenParityfunction, but converts bytes with even parity to'e'and other bytes to'o'. heads up bestie: the functionshowParitymust be imported by a specialised import list. it doesn't just show up, you have to invite it. π«ΆshowMarkSpace LISTβ likesetEvenParityfunction, but converts bytes with space parity to's'and other bytes to'm'. and same rule again: the functionshowMarkSpacemust be imported by a specialised import list. no invite, no party. π
β οΈ NOTES β οΈ
don't use this module unless you have to communicate with some old device or protocol. like, genuinely. please make your application 8 bit clean and use the internationally standardised ISO-8859-1 character set. this is the "text your ex" of modules β only when there's truly no other option. π
π SEE ALSO π
I don't know of any other modules that provide similar functionality. if you do, please let me know so I can update this section. fr fr, the author is asking, they want the info. π
π REPOSITORY π
<https://github.com/neilb/String-Parity>
π AUTHOR π
this module was written by Winfried Koenig.
updates to follow modern CPAN conventions by Neil Bowers (NEILB).
π COPYRIGHT AND LICENSE π
this software is copyright (c) 1995 by Winfried Koenig.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. π
and that's a wrap bestie π this whole page is String::Parity(3pm) from perl v5.36.0, dated 2022-10-13 β go forth and parity-check responsibly, mwah π
β¨
π¦ where this page comes from
- ubuntu noble: libstring-parity-perl 1.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libstring-parity-perl 1.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libstring-parity-perl 1.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms