Skip to content

arshad-deriv/perl-Format-Util

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Format::Util - Miscellaneous routines to do with manipulating on Numbers and Strings

Build Status codecov Gitter chat

SYNOPSIS

use Format::Util::Strings qw( defang defang_lite set_selected_item )
use Format::Util::Numbers qw( commas to_monetary_number_format roundnear )

METHODS

  • defang($string)

    Removes potentially dangerous characters from input strings.

    You should probably be using Untaint.

  • defang_lite($string)

    Removes potentially dangerous characters from input strings.

    You should probably be using Untaint.

    defang_lite is a lighter version that is not so restrictive as defang

  • set_selected_item($selecteditem,$optionlist)

    Sets the selected item in an list.

    Params :

    • $selecteditem : the value of the item (usually taken from %input)

    • $optionlist : The option list, as either an HTML string or a hash ref.

    Returns : If hash ref given, 1 if selected item is set, false otherwise

    If HTML given, the altered HTML

  • commas($number, $decimal_point)

    Produce a more human readbale number with a provided number of decimal points

    commas(12345.679, 1) => 12,345.7

  • to_monetary_number_format($number,$remove_decimal_for_ints)

    Produce a nice human readable number which looks like a currency

    to_monetary_number_format(123456789) => 123,456,789.00

  • roundnear($target, $input)

    Round a number near the precision of the supplied one.

    roundnear( 0.01, 12345.678) => 12345.68

AUTHOR

binary.com, C<< >>

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Math::Util::CalculatedValue

You can also look for information at:

RT: CPAN's request tracker (report bugs here)

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Format-Util

AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Format-Util

CPAN Ratings

http://cpanratings.perl.org/d/Format-Util

Search CPAN

http://search.cpan.org/dist/Format-Util/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 100.0%