String::Parity(3pm)

πŸ“¦
version 1.34 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 of LIST to 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 β€” like setEvenParity function, but converts to strings with odd parity. same energy, different bit. πŸ’œ
  • setSpaceParity LIST β€” like setEvenParity function, but converts to strings with space parity (High bit cleared). clearing bits, clearing vibes. 🧚
  • setMarkParity LIST β€” like setEvenParity function, 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 of LIST. a whole count. a census. πŸ“
  • OddBytes LIST β€” returns the number of odd parity bytes in the elements of LIST. πŸ¦‹
  • SpaceBytes LIST β€” returns the number of space parity bytes in the elements of LIST. ⭐
  • MarkBytes LIST β€” returns the number of mark parity bytes in the elements of LIST. πŸ‘‘
  • isEvenParity LIST β€” returns TRUE if the LIST contains no byte with odd parity, FALSE otherwise. it's giving "is anybody here chaotic?" πŸ™ˆ
  • isOddParity LIST β€” returns TRUE if the LIST contains no byte with even parity, FALSE otherwise. πŸ’€
  • isSpaceParity LIST β€” returns TRUE if the LIST contains no byte with mark parity, FALSE otherwise. 🌈
  • isMarkParity LIST β€” returns TRUE if the LIST contains no byte with space parity, FALSE otherwise. πŸ’–
  • showParity LIST β€” like setEvenParity function, but converts bytes with even parity to 'e' and other bytes to 'o'. heads up bestie: the function showParity must be imported by a specialised import list. it doesn't just show up, you have to invite it. 🫢
  • showMarkSpace LIST β€” like setEvenParity function, but converts bytes with space parity to 's' and other bytes to 'm'. and same rule again: the function showMarkSpace must 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).


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