NAME

IRC::Toolkit::Case::MappedString - Strings with casemaps attached

SYNOPSIS

use IRC::Toolkit::Case;
my $str = irc_str( strict => 'Nick^[Abc]' );
if ($str eq 'nick^{abc}') {
  # true
}

DESCRIPTION

These overloaded objects represent IRC strings with a specific IRC casemap attached (such as nick/channel names).

See IRC::Toolkit::Case for more details on IRC casemapping peculiarities.

new

Creates a new string object.

Expects a casemap and string; if given a single argument, it is taken to be the string and the casemap defaults to RFC1459.

as_string

Returns the raw string.

as_upper

Returns a new string object containing the uppercased (per specified rules) string.

as_lower

Returns a new string object containing the lowercased (per specified rules) string.

casemap

Returns the currently-configured casemap setting.

length

Returns the string's length.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>