1XString(3) User Contributed Perl Documentation XString(3)
2
3
4
6 XString - Isolated String helpers from B
7
9 version 0.005
10
12 #!perl
13
14 use strict;
15 use warnings;
16
17 use Test::More;
18
19 use XString;
20 use B;
21
22 is XString::cstring( q[a'string"with quotes] ), B::cstring( q[a'string"with quotes] ), q["a'string\"with quotes"];
23 is XString::perlstring( q[a'string"with quotes] ), B::perlstring( q[a'string"with quotes] ), q["a'string\"with quotes"];
24
25 done_testing;
26
28 XString provides the B string helpers in one isolated package. Right
29 now only cstring and perlstring are available.
30
32 cstring(STR)
33 Similar to B::cstring; Returns a double-quote-surrounded escaped
34 version of STR which can be used as a string in C source code.
35
36 perlstring(STR)
37 Similar to B::perlstring; Returns a double-quote-surrounded escaped
38 version of STR which can be used as a string in Perl source code.
39
41 Nicolas R <atoomic@cpan.org>
42
44 This software is copyright (c) 2018 by cPanel, Inc.
45
46 This is free software; you can redistribute it and/or modify it under
47 the same terms as the Perl 5 programming language system itself.
48
49
50
51perl v5.36.0 2023-01-20 XString(3)