Samuel Lauber > Ctype > Ctype

Download:
Ctype-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Ctype - Perl extension for character class testing

SYNOPSIS ^

  use Ctype qw(toupper);
  # plain style
  $uppercased = toupper("a");
  # OO style
  $obj = Ctype->new("a");
  $uppercased = $obj->uppercased;

DESCRIPTION ^

Ctype provides character class testing to Perl programs. The ctype.h functions are part of the C library (in your system!). Ctype also supports the Perl library ctype functions. To use the Perl library ctype functions, set the variable $Ctype::useperlfns to a non-false value. For the OO interface, call the method $obj->useperlfns to toggle it.

The OO interface constructor is called (by convention) new. new is called with a character as an argument. It creates a Ctype object that will perform tests on the character when called as an object method. These are the relations to the regular C functions:

        isalphanumeric          isalnum
        isalphabetic            isalpha
        isnumerical             isdigit
        islowercase             islower
        iswhitespace            isspace
        isuppercase             isupper
        ishexdigit              isxdigit
        
        tolowercase             tolower
        touppercase             toupper

The setchar method sets the character stored in the object.

AUTHOR ^

Samuel Lauber, <sam124@operamail.com>

COPYRIGHT ^

This module is not copyrighted. It may be redistributed as much as you want.

SEE ALSO ^

perl, ctype.h, DJGPP C Library Refrence, GNU C Library Manual, et al.

syntax highlighting: