# phpman > man > XString(3pm)

## NAME
    XString - Isolated String helpers from B

## VERSION
    version 0.005

## SYNOPSIS
     #!perl

     use strict;
     use warnings;

     use [Test::More](https://www.chedong.com/phpMan.php/perldoc/Test%3A%3AMore/markdown);

     use XString;
     use B;

     is [XString::cstring](https://www.chedong.com/phpMan.php/perldoc/XString%3A%3Acstring/markdown)( q[a'string"with quotes] ), [B::cstring](https://www.chedong.com/phpMan.php/perldoc/B%3A%3Acstring/markdown)( q[a'string"with quotes] ), q["a'string\"with quotes"];
     is [XString::perlstring](https://www.chedong.com/phpMan.php/perldoc/XString%3A%3Aperlstring/markdown)( q[a'string"with quotes] ), [B::perlstring](https://www.chedong.com/phpMan.php/perldoc/B%3A%3Aperlstring/markdown)( 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.

## FUNCTIONS
  cstring(STR)
    Similar to [B::cstring](https://www.chedong.com/phpMan.php/perldoc/B%3A%3Acstring/markdown); Returns a double-quote-surrounded escaped version of STR which can be
    used as a string in C source code.

  perlstring(STR)
    Similar to [B::perlstring](https://www.chedong.com/phpMan.php/perldoc/B%3A%3Aperlstring/markdown); Returns a double-quote-surrounded escaped version of STR which can be
    used as a string in Perl source code.

## AUTHOR
    Nicolas R <<atoomic@cpan.org>>

## COPYRIGHT AND LICENSE
    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.

