[OpenLayers-Trac] [OpenLayers] #1133: Format a string given a string template and some context.
OpenLayers
trac at openlayers.org
Fri Nov 9 17:37:34 EST 2007
#1133: Format a string given a string template and some context.
----------------------+-----------------------------------------------------
Reporter: tschaub | Owner:
Type: feature | Status: new
Priority: minor | Milestone: 2.6 Release
Component: general | Version: 2.5
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by ahocevar):
Replying to [comment:1 tschaub]:
> and I had my head on backwards, that "$\{" doesn't work as advertised in
the doc string - so that's an open question: "how do you represent the
string "${"?
I think that optimized performance is crucial to this function, so I would
propose to represent "${" by "${${". I created a patch for this, which
also handles the "}" character without a preceding "${" correctly.
Performance is improved by starting the loop at 1 instead of 0 - the first
token never needs to be replaced.
--
Ticket URL: <http://trac.openlayers.org/ticket/1133#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list