php man page for numfmt_set_symbol

Query: numfmt_set_symbol

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

NUMFMT_SET_SYMBOL(3)							 1						      NUMFMT_SET_SYMBOL(3)

NumberFormatter::setSymbol - Set a symbol value

	Object oriented style

SYNOPSIS
public bool NumberFormatter::setSymbol (int $attr, string $value)
DESCRIPTION
Procedural style bool numfmt_set_symbol (NumberFormatter $fmt, int $attr, string $value) Set a symbol associated with the formatter. The formatter uses symbols to represent the special locale-dependent characters in a number, for example the percent sign. This API is not supported for rule-based formatters.
PARAMETERS
o $fmt -NumberFormatter object. o $attr - Symbol specifier, one of the format symbol constants. o $value - Text for the symbol.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 numfmt_set_symbol(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; numfmt_set_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*"); echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo numfmt_format($fmt, 1234567.891234567890000)." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo $fmt->format(1234567.891234567890000)." "; $fmt->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*"); echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)." "; echo $fmt->format(1234567.891234567890000)." "; ?> The above example will output: Sep: . 1.234.567,891 Sep: * 1*234*567,891
SEE ALSO
numfmt_get_error_code(3), numfmt_get_symbol(3). PHP Documentation Group NUMFMT_SET_SYMBOL(3)
Related Man Pages
numfmt_create(3) - php
datefmt_set_lenient(3) - php
msgfmt_set_pattern(3) - php
numfmt_get_symbol(3) - php
numfmt_set_text_attribute(3) - php
Similar Topics in the Unix Linux Community
rename using mv ?
formating number strings
sed coding
Text Matching
Awk Command help