#6636 closed enhancement (fixed)
Add dojo.string.rep
Reported by: | Eugene Lazutkin | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Core | Version: | 1.1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The core lacks an efficient string repeating algorithms. Even dojo.string.pad() uses linear addition of the padding string, which leads to linear to quadratic times depending on case and a browser. It is possible to repeat strings in logarithmic time.
Change History (2)
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
Milestone: | 1.1.1 → 1.2 |
---|
Note: See
TracTickets for help on using
tickets.
(In [13445]) Added dojo.string.rep(), which creates a new string by repeating the argument string given number of times in logarithmic time. dojo.string.pad() is reformulated to take advantage of the new function. Fixes #6636.