Possibility of standardized sprintf() in ES4?

Samuel R. Neff srneff.lists at gmail.com
Tue Oct 16 06:13:40 PDT 2007

I would be all for .NET's String.Format() style of formatting.  Adobe Flex
provides a similar method in StringUtil.substitute() which provides ordered
substitution using the same {0} and {1} style tokens, but doesn't have any


We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact careers at blinemedical.com
-----Original Message-----
From: es4-discuss-bounces at mozilla.org
[mailto:es4-discuss-bounces at mozilla.org] On Behalf Of zwetan
Sent: Monday, October 15, 2007 5:51 PM
To: Dan Scott
Cc: es4-discuss at mozilla.org
Subject: Re: Possibility of standardized sprintf() in ES4?


> Is there any other interest in adding a native sprintf() (probably as
> String.sprintf()) to the ES4 specs?

I'm interested in string formating, but surely not sprintf
I don't find it intuitive at all

I prefer something closer to String.format from .NET
but more dynamic and being able to use sort of tokens
like the ones you can use with E4X (<node>{token}</node>)

see here for an implementation
( public static function format( format:String, ...args ):String )

Es4-discuss mailing list
Es4-discuss at mozilla.org

More information about the Es4-discuss mailing list