XString(3)

🌸 NAME 🌸

Okay so welcome to XString(3), bestie β€” this is the User Contributed Perl Documentation page for XString: Isolated String helpers from B. It’s literally giving β€œstring helpers, but make it their own isolated package” energy πŸ’….

✨ VERSION ✨

version 0.005 β€” that’s the current vibe check, no cap.

πŸŽ€ SYNOPSIS πŸŽ€

Okay so here’s the whole group-chat receipts, and yes, copy it exactly:

#!perl

use strict;
use warnings;

use Test::More;

use XString;
use B;

is XString::cstring( q[a'string"with quotes] ), B::cstring( q[a'string"with quotes] ), q["a'string\"with quotes"];
is XString::perlstring( q[a'string"with quotes] ), B::perlstring( q[a'string"with quotes] ), q["a'string\"with quotes"];

done_testing;

πŸ’… DESCRIPTION πŸ’…

XString provides the B string helpers in one isolated package. Right now only cstring and perlstring are available β€” that’s the whole lineup, no secret menu 🫢.

πŸ¦‹ FUNCTIONS πŸ¦‹

cstring(STR)

Similar to B::cstring; it returns a double-quote-surrounded escaped version of STR which can be used as a string in C source code. So if you need your string to look cute and C-safe, this is the one πŸ”₯.

perlstring(STR)

Similar to B::perlstring; it returns a double-quote-surrounded escaped version of STR which can be used as a string in Perl source code. Perl-ready escaping, iconic behavior, periodt ✨.

πŸ‘‘ AUTHOR πŸ‘‘

Nicolas R <atoomic@cpan.org> β€” yes, that’s the author, bestie 🌈.

This software is copyright (c) 2018 by cPanel, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


Later, bestie πŸ’… β€” this page is from perl v5.42.0, dated 2020-10-21, and it’s XString(3) all the way down 🫢

πŸ“¦ where this page comes from