BBC (British Broadcasting Corporation) > Pinwheel-0.2.7 > Pinwheel::Helpers::Text

Download:
Pinwheel-0.2.7.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Source  

SYNOPSIS ^

  use Pinwheel::Helpers::Text;

  # The following are listed in @EXPORT_OK, but nothing is exported by default

  $text = h($text); # ?

  $text = uc($text); # UPPER CASE
  $text = lc($text); # lower case
  $text = tc($text); # Title Case (uses \b to detect words)

  # Joins the items of @list using $sep, except for the last item which is
  # joined using $last_sep
  $text = join(\@list, $sep, $last_sep);
  join(["Dave Dee", "Dozy", "Beaky", "Mick", "Tich"], ", ", " & ") -> "Dave Dee, Dozy, Beaky, Mick & Tich"

  simple_format; # ?
  # p is an alias for simple_format

  cycle; # ?

  $text = pluralize($count, $singular[, $plural]);
  pluralize(1, "mouse", "mice") -> "mouse"
  pluralize(2, "mouse", "mice") -> "mice"
  pluralize(1, "dog")           -> "dog"
  pluralize(2, "dog")           -> "dogs"

  $text = ordinal_text($n); # One of: st nd rd th
                            # depending on $n

1;

syntax highlighting: