© Copyright 2000-2015 Source Code Online. Free Source Code and Scripts Downloads.
Format number function
File ID: 65609
Format number function Description
Description: For many languages it is possible to use the locale module to format numbers. But there are at least three languages for which the locale.localeconv()['thousands_sep'] is empty: brazilian portuguese - 'pt_br', portuguese - 'pt' and spanish - 'es'.
The first function, format_positive_integer() will return the passed integer number as a string with the thousands group separator added.
The second function, format_number() much more generic, will accept any number, integer or float, positive or negative, and return a string with the thousands group separator and the desired precision.
|More Similar Code|
The Format Number API module provides a method to configure number formats (site default and user defined) with configurable decimal point and thousand separators.
Since 6.x-1.6: This module also provides the 'numericfield' Forms API element, which is a right aligned text input element that allows the user enter numbers using the configured thousands separator and decimal point (site default or user defined). This Forms API element...
The Formatted Number CCK module defines numeric types where thousands separator and decimal point are inherited from the Format Number API module.
Numeric types supported: signed or unsigned integers (tiny, small,...
Prints the current line number, function name and some text. Useful for debugging.
A function to convert decimal integer numbers, (from 0 to 255), into byte(s) format.
Another function calling the above function to convert ASCII strings into byte(s) format.
Python 3.1.3 (r313:86834, Nov 28 2010, 10:01:07)
This string manipulation article lets you know the steps needed to convert the text in proper case format. The function PropCase() is illustrated with an example program how to capitalize the starting letter of each word that are passed through an...
The 'London Comedy Gigs' plugin will display a constantly updating list of comedy gigs in the capital, with all the big name comedians, little stand-up shows and West End theatre runs.
The listing will include a title, description and...
A function to convert a number to a more readable format by adding thousands separators.
This very simple function lets you choose the thousands separator character and the number of decimal spaces to return. Any character (including...
This includes a function to read in the standard flow cytometry FCS format data and examples of how to visualize the data.
M-file that calculate weeknumber based on a date. Date can be given as scalar or a vector. Datevalues can also be provided as textvalues, but then must a second variable describing the that format also be read in.
In addtion can a third...
This plugin creates a function called "my_akismet_count();" which will return a sentence like the following:
Akismet has protected my blog from 468 spam comments. Nice try!
Provided you have Akismet installed, it...
|User Review for Format number function
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.