On 19 Jan 2001 [EMAIL PROTECTED] wrote:
> ID: 8803
> Updated by: derick
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Closed
> Bug Type: Unknown/Other Function
> Assigned To:
> Comments:
>
> This works fine:
>
> echo sprintf ("%2x", 29);
>
> output:
> 1d
>
> This is not a bug.
Does %.2x work? If not, then it is indeed not in compliance
with C99. 7.19.6 says:
An optional precision that gives the minimum number of
digits to appear for the [..] x, and X conversions [..].
o,u,x,X: [..]
The precision specifies the minimum number of
digits to appear; if the value being converted
can be represented in fewer digits, it is
expanded with leading zeros. The default
precision is 1.
- Sascha
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]