NAME

Curse::ByteStream - Text And Bytestream Manipulation

SYNOPSIS

use Curse::ByteStream;

my $stream = Curse::ByteStream->new('foobarbaz');

$stream->camelize;
$stream->decamelize;
$stream->b64_encode;
$stream->b64_decode;
$stream->encode('utf8');
$stream->decode('utf8');
$stream->md5_sum;
$stream->qp_decode;
$stream->qp_encode;
$stream->quote;
$stream->unquote;
$stream->url_escape;
$stream->url_sanitize;
$stream->url_unescape;

my $length = $stream->length;

my $stream2 = $stream->clone;
print $stream2->as_string;

# Chained
my $stream = Curse::ByteStream->new('foo bar baz')->quote;
$stream = $stream->unquote->encode('utf8)->b64_encode;
print "$stream";

DESCRIPTION

Curse::ByteStream provides portable text and bytestream manipulation functions.

ATTRIBUTES

length

my $length = $stream->length;

METHODS

Curse::ByteStream inherits all methods from Nevermore and implements the following new ones.

new

my $stream = Curse::ByteStream->new($string);

as_string

my $string = $stream->as_string;

b64_decode

$stream = $stream->b64_decode;

b64_encode

$stream = $stream->b64_encode;

camelize

$stream = $stream->camelize;

clone

my $stream2 = $stream->clone;

decamelize

$stream = $stream->decamelize;

decode

$stream = $stream->decode($encoding);

encode

$stream = $stream->encode($encoding);

md5_sum

$stream = $stream->md5_sum;

qp_decode

$stream = $stream->qp_decode;

qp_encode

$stream = $stream->qp_encode;

quote

$stream = $stream->quote;

unquote

$stream = $stream->unquote;

url_escape

$stream = $stream->url_escape;

url_sanitize

$stream = $stream->url_sanitize;

url_unescape

$stream = $stream->url_unescape;

SEE ALSO

Digest::MD5, Encode, MIME::Base64, MIME::QuotedPrint