Text design
From CSSEMediaWiki
(Difference between revisions)
m (Reverted edits by Ebybymic (Talk); changed back to last version by Lukas Korsika) |
|||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Design a class (or classes) to represent text, i.e. a sequence of characters. Support search and replace for subsequences. | Design a class (or classes) to represent text, i.e. a sequence of characters. Support search and replace for subsequences. | ||
Latest revision as of 03:05, 25 November 2010
Design a class (or classes) to represent text, i.e. a sequence of characters. Support search and replace for subsequences.
Another proposed design would be to define an interface for Text, and first create a simple implementation that uses an array of characters to store the string, resizing it when necessary. If there are performance issues, we can create other solutions, for example a Text implementation that works like a treenode, by storing a left and a right Text, which it combines together. --Lukas Korsika 01:13, 21 October 2010 (UTC)