Jon Portnoy > IRC-Toolkit-0.070002 > IRC::Toolkit::Case

Download:
IRC-Toolkit-0.070002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.070002   Source   Latest Release: IRC-Toolkit-0.088001

NAME ^

IRC::Toolkit::Case - IRC case-folding utilities

SYNOPSIS ^

  use IRC::Toolkit::Case;

  my $lower = lc_irc( $string, 'rfc1459' );

  my $upper = uc_irc( $string, 'ascii' );

  if (eq_irc($first, $second, 'strict-rfc1459')) {
    ...
  }

DESCRIPTION ^

IRC case-folding utilities.

IRC daemons typically announce their casemap in ISUPPORT (via the CASEMAPPING directive). This should be one of rfc1459, strict-rfc1459, or ascii:

  'ascii'           a-z      -->  A-Z
  'rfc1459'         a-z{}|^  -->  A-Z[]\~   (default)
  'strict-rfc1459'  a-z{}|   -->  A-Z[]\

lc_irc

Takes a string and an optional casemap.

Returns the lowercased string.

uc_irc

Takes a string and an optional casemap.

Returns the uppercased string.

eq_irc

Takes a pair of strings and an optional casemap.

Returns boolean true if the strings are equal (per the rules specified by the given casemap).

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

Inspired by IRC::Utils, copyright Chris Williams, Hinrik et al

syntax highlighting: