[ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
NumberFormat class file. This program is free software; you can redistribute it and/or modify it under the terms of the BSD License.
Author: | Wei Zhuo |
Version: | $Revision: 1.6 $ $Date: 2005/12/20 09:32:42 $ |
Poids: | 308 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
NumberFormat:: (5 méthodes):
__construct()
format()
formatInteger()
formatDecimal()
setPattern()
Classe: NumberFormat - X-Ref
NumberFormat class.__construct($formatInfo=null) X-Ref |
Create a new number format instance. The constructor can be instantiated with a string that represent a culture/locale. Similarly, passing a CultureInfo or NumberFormatInfo instance will instantiated a instance for that particular culture. param: mixed either null, a CultureInfo, a NumberFormatInfo, or string return: NumberFormat |
format($number, $pattern='d', $currency='USD', $charset='UTF-8') X-Ref |
For the number for a certain pattern. The valid patterns are 'c', 'd', 'e', 'p' or a custom pattern, such as "#.000" for 3 decimal places. param: mixed the number to format. param: string the format pattern, either, 'c', 'd', 'e', 'p' param: string 3-letter ISO 4217 code. For example, the code return: string formatted number string |
formatInteger($string) X-Ref |
For the integer, perform groupings and string padding. param: string the decimal number in string form. return: string formatted integer string with grouping |
formatDecimal($string) X-Ref |
Format the decimal places. param: string the decimal number in string form. return: string formatted decimal places. |
setPattern($pattern) X-Ref |
Set the pattern to format against. The default patterns are retrieved from the NumberFormatInfo instance. param: string the requested patterns. return: string a number format pattern. |
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |