Hey Im starting out in C just recently and Im needing a string that converts binary to text, The only way i know of doing this without knowledge of C entirely. Is Making a sorta of library of the entire alphabet in binary for the program to select the text from it to display a sentence. If that... (2 Replies)
Hi,
I have a script that finds the application logs from the previous day and sends it to another server via ftp.
The code is something like this:
yest_date=`TZ=CST+24 date "+%b %d"`
logdir=/app/logs
logs=app*.log
tmpdir=/tmp
cd $logdir
for i in `ls -1 $logs`
do
chkstr=`ls -1l $i | grep... (2 Replies)
Hi ,I have seen this comverters before ,but I was searching today and I can not find them .Is anybody used them before .Any recomendations
Thanks (5 Replies)
Discussion started by: lio123
5 Replies
LEARN ABOUT PHP
numfmt_parse_currency
NUMFMT_PARSE_CURRENCY(3) 1 NUMFMT_PARSE_CURRENCY(3)NumberFormatter::parseCurrency - Parse a currency number
Object oriented style
SYNOPSIS
public float NumberFormatter::parseCurrency (string $value, string &$currency, [int &$position])
DESCRIPTION
Procedural style
float numfmt_parse_currency (NumberFormatter $fmt, string $value, string &$currency, [int &$position])
Parse a string into a double and a currency using the current formatter.
PARAMETERS
o $fmt
-NumberFormatter object.
o $currency
- Parameter to receive the currency name (3-letter ISO 4217 currency code).
o $position
- Offset in the string at which to begin parsing. On return, this value will hold the offset at which parsing ended.
RETURN VALUES
The parsed numeric value or FALSE on error.
EXAMPLES
Example #1
numfmt_parse_currency(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY );
$num = "1.234.567,89xc2xa0$";
echo "We have ".numfmt_parse_currency($fmt, $num, $curr)." in $curr
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
$num = "1.234.567,89xc2xa0$";
echo "We have ".$fmt->parseCurrency($num, $curr)." in $curr
";
?>
The above example will output:
We have 1234567.89 in USD
SEE ALSO numfmt_get_error_code(3), numfmt_parse(3), numfmt_format_currency(3).
PHP Documentation Group NUMFMT_PARSE_CURRENCY(3)