Nile::Filter - Filter functions for Nile framework.
$filter = $me->filter; # trim leading and traling spaces $str = $filter->trim($str);
$str = $filter->trim($str); @str = $filter->trim(@str);
Remove white spaces from left and right of a string.
$str = $filter->ltrim($str); @str = $filter->ltrim(@str);
Remove white spaces from left of a string.
$str = $filter->rtrim($str); @str = $filter->rtrim(@str);
Remove white spaces from right of a string.
$str = $filter->trims($str); @str = $filter->trims(@str);
Remove all white spaces from a string.
$str = $filter->strip_html($str);
Remove all html tags from a string.
$str = $filter->disable_html($str);
Disable all html tags in a string.
$str = $filter->escape_html($str);
Encode entities ' " & < > in string.
' " & <
# remove <script...>...</script> tags $str = $filter->strip_script($str);
Remove script tags from a string.
$str = $filter->quotemeta($str);
Returns all the ASCII non-"word" characters backslashed.
$str = $filter->uc($str);
Upper case the string letters.
$str = $filter->lc($str);
Lower case the string letters.
$str = $filter->ucfirst($str);
Upper case the first letter in a string.
$str = $filter->lcfirst($str);
Lower case the first letter in a string.
$valid_email = $filter->email('ahmed@email.com');
Returns the valid email or undef if not passed.
$valid_url = $filter->uri('http://www.domain.com/path/file');
Returns the valid url or undef if not passed.
$digits = $filter->digit($str);
Removes none digits from string and converts to integer.
$str = "data -123.45678"; $number = $filter->number($str); say $number; # -123.45678
Converts string to number.
$number = 12345678; $commified = $filter->commify($number); say $commified; # 12,345,678
Format numbers with commas nicely for easy reading.
This project is available on github at https://github.com/mewsoft/Nile.
Please visit the project's homepage at https://metacpan.org/release/Nile.
Source repository is at https://github.com/mewsoft/Nile.
See Nile for details about the complete framework.
Ahmed Amin Elsheshtawy, احمد امين الششتاوى <mewsoft@cpan.org> Website: http://www.mewsoft.com
Copyright (C) 2014-2015 by Dr. Ahmed Amin Elsheshtawy احمد امين الششتاوى mewsoft@cpan.org, support@mewsoft.com, https://github.com/mewsoft/Nile, http://www.mewsoft.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Nile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nile
CPAN shell
perl -MCPAN -e shell install Nile
For more information on module installation, please visit the detailed CPAN module installation guide.