Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#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:


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 14 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(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.

comment:2 Changed 14 years ago by bill

Note: See TracTickets for help on using tickets.