numfmt_get_pattern(3) php man page | unix.com

Man Page: numfmt_get_pattern

Operating Environment: php

Section: 3

NUMFMT_GET_PATTERN(3)							 1						     NUMFMT_GET_PATTERN(3)

NumberFormatter::getPattern - Get formatter pattern

	Object oriented style

SYNOPSIS
public string NumberFormatter::getPattern (void )
DESCRIPTION
Procedural style string numfmt_get_pattern (NumberFormatter $fmt) Extract pattern used by the formatter.
PARAMETERS
o $fmt -NumberFormatter object.
RETURN VALUES
Pattern string that is used by the formatter, or FALSE if an error happens.
EXAMPLES
Example #1 numfmt_get_pattern(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); echo "Pattern: ".numfmt_get_pattern($fmt)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; numfmt_set_pattern($fmt, "#0.# kg"); echo "Pattern: ".numfmt_get_pattern($fmt)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); echo "Pattern: ".$fmt->getPattern()." "; echo $fmt->format(1234567.891234567890000)." "; $fmt->setPattern("#0.# kg"); echo "Pattern: ".$fmt->getPattern()." "; echo $fmt->format(1234567.891234567890000)." "; ?> The above example will output: Pattern: #,##0.### 1.234.567,891 Pattern: #0.# kg 1234567,9 kg
SEE ALSO
numfmt_get_error_code(3), numfmt_set_pattern(3), numfmt_create(3). PHP Documentation Group NUMFMT_GET_PATTERN(3)
Related Man Pages
numfmt_get_text_attribute(3) - php
numfmt_get_pattern(3) - php
numfmt_parse(3) - php
numfmt_set_pattern(3) - php
numberformatter.gettextattribute(3) - php
Similar Topics in the Unix Linux Community
file format
addition of decimal no
Pattern count for numeric values in aix
Formatting paragraphs with fmt with rule
sed Range Pattern and 2 lines before Start Pattern