VSP(3)

πŸ“¦ version 0.1, in fedora 43, fedora 44

πŸ’– VSP(3) πŸ’–

okay bestie, welcome to the Library Functions Manual section for vsp ✨ this is a C library function, and it's giving "glow-up translator": it takes a Perl version string and turns it into an RPM version string. no cap.


🌸 NAME 🌸

vsp β€” covert Perl version string into RPM version string

(yes it says "covert" not "convert", that's literally what's written, we're not editing the source material πŸ’…)


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fvsp.h>

char *vsp(const char *input, _Bool shorten);

✨ DESCRIPTION ✨

so the vsp() function does one job and it does it iconically: it converts a Perl version value into RPM version string format. that's it. that's the whole personality.

  • input β€” this is your Perl version string, bestie. could be a fraction, could be a dotted one, whatever vibe it's serving. and listen: an empty string is equaled to "0", so don't come at it with nothing and expect chaos.
  • shorten β€” when this is true, it cuts off the trailing zero groups. so satisfying, honestly. but heads up: if no digit would remain after all that trimming, you get an empty string back. zero digits, zero string, periodt.

πŸŽ€ RETURN VALUE πŸŽ€

you get back an RPM-compatible version string. slay.

🚨 IMPORTANT BESTIE ALERT 🚨 the caller is responsible for deallocating the returned value with free(3). that's on you, not on vsp(). don't be the person who leaks memory, it's not the vibe.

and if something goes wrong? NULL is returned. 😭 that's the error signal. respect it.


πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ that's the page πŸ‘‘

fr fr you made it to the end, main character energy πŸ’œ this was the VSP(3) page from the Library Functions Manual β€” go forth and convert those version strings responsibly. bye bestie πŸ«ΆπŸŒΈπŸ’…

πŸ“¦ where this page comes from