-
-
31 Oct 2021 01:13:03 UTC
- Distribution: Text-Xslate
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (35)
- Testers
- Kwalitee
Bus factor: 6- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (211.29KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 38 contributors-
Fuji, Goro (gfx).
-
André Walker
-
Anirvan Chatterjee
-
Ashley Pond V
-
Brian Fraser
-
Christian Walde
-
David Steinbrunner
-
Fuji, Goro (gfx)
-
Fuji, Goro
-
Hao Wu
-
James E Keenan
-
Jesse Luehrs
-
Justin Cook
-
Kazuhiro Osawa
-
Kenichi Ishigaki
-
Kentaro Horio
-
Kevin M. Goess
-
Konstantin S. Uvarin
-
Mariano Wahlmann
-
Masahiro Chiba
-
Michael Kröll
-
Mike Raynham
-
Mons Anderson
-
Nick Morrott
-
Olaf Alders
-
Shigeki Morimoto
-
Syohei YOSHIDA
-
Tasuku SUENAGA a.k.a. gunyarakun
-
Tokuhiro Matsuno
-
Ueda Satoshi
-
Yoshiki Kurihara
-
c9s
-
hiratara
-
hitode909
-
lestrrat
-
makamaka
-
moznion
-
punytan
NAME
Text::Xslate::Bridge::Star - Selection of common utilities for templates
SYNOPSIS
use Text::Xslate; my $tx = Text::Xslate->new( module => ['Text::Xslate::Bridge::Star'], );
DESCRIPTION
This module provides a selection of utilities for templates.
FUNCTIONS
lc($str)
Returns a lower-cased version of $str. The same as
CORE::lc()
, but returns undef if $str is undef.See "lc" in perldoc for details.
uc($str)
Returns a upper-cased version of $str. The same as
CORE::uc()
, but returns undef if $str is undef.See "uc" in perldoc for details.
substr($str, $offset, $len)
Extracts a substring out of $str and returns it. The same as
CORE::substr()
, but returns undef if $str is undef.See "substr" in perldoc for details.
sprintf($fmt, args...)
Returns a string formatted by the
CORE::sprintf()
. $fmt must be a defined value.See "sprintf" in perldoc for details.
rx($regex_pattern)
Compiles $regex_patter as a regular expression and return the regex object. You can pass a regex object to
match()
orreplace()
described below. The same asqr//
operator in Perl.match($str, $pattern)
Tests if $str matches $pattern. $pattern may be a string or a regex object.
Like
$str =~ $pattern
in Perl but you have to pass a regex object explicitly if you can use regular expressions.Examples:
: match("foo bar baz", "foo") ? "true" : "false" # true : match("foo bar baz", "f..") ? "true" : "false" # false : match("foo bar baz", rx("f..")) ? "true" : "false" # true
replace($str, $pattern, $replacement)
Replaces all the $patterns in $str with $replacements. Like as
$str =~ s/$pattern/$replacement/g
but you have to pass a regex object explicitly if you can use regular expressions.split($str [, $pattern [, $limit]])
Splits the string $str into a list of strings and returns the list.
SEE ALSO
Module Install Instructions
To install Text::Xslate, copy and paste the appropriate command in to your terminal.
cpanm Text::Xslate
perl -MCPAN -e shell install Text::Xslate
For more information on module installation, please visit the detailed CPAN module installation guide.