On 15/10/2007, ekameleon <[EMAIL PROTECTED]> wrote:
>
> Hello :)
>
> Yes i prefere too the Strings.format implementation :)  For me it's an
> important feature and can be insert in the core String methods :)
>
> EKA+ :)
>
> 2007/10/15, zwetan <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > ...
> > >
> > > 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
> > http://maashaack.googlecode.com/svn/trunk/ES4a/src/system/Strings.as
> > ( public static function format( format:String, ...args ):String )
> >
> > cheers,
> > zwetan
> > _______________________________________________
> > Es4-discuss mailing list
> > Es4-discuss@mozilla.org
> > https://mail.mozilla.org/listinfo/es4-discuss
> >
>
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
>
Sure. From what I can see of the Microsoft documentation a standardized
String.format() function would meet the need for a standardized way of
formatting a string just as well as a method based on C/Perl/PHP/Ruby
sprintf() and Python's native string formatting, where named parameters are
used instead of positional parameters.

Assuming there are no intellectual property concerns with adopting
Microsoft's specification for this method, it would satisfy my use case for
a string formatting method that accepts explicit positional or named
parameters in support of internationalized text. I would simply be delighted
if ES4 saved me and others from having to roll our own string formatter
classes!

-- 
Dan Scott
Laurentian University
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to