Deleting would be to simply remove that character in the buffer and perhaps shift the array eventually. Insert at a specific location would simply be shifting the chars over and inserting the text at that location. String data type is mentioned as the underlying data storage is a char buffer. This is one of the more simpler and straightforward approach. It's important to note that text editors will often use a few data structures to implement different functionalities. Data Structuresįunctional data structures will only be briefly included at the end Text editors in the past or that are currently being used have used these data structures listed down below. Vert important There is no clear-cut solution as text editors will all vary in what data structures are used. It primarily based on what you want your text editor to be able to do. There are always tradeoffs when it comes to data structures as you have to consider the difficulty of implementation for the performance and memory tradeoffs. The bare backbones of a text editor heavily relies on the data structures you decide to use for your operations. Perhaps you want a text editor that minimizes memory usage while still performs adequately enough. Take for instance you want a text editor to handle small files and fixed lengths of lines. Perhaps you want a specialized text editor rather than a general purpose one as this will make a significant impact on designing and implementing a text editor. It's important to consider your target audience (users) and what functionalities that you want your text editor to have. Text editors can be somewhat simple or rather complex depending on the design and implementation. Additonal features that are practically required to even compete with other text editors are: find and replace, copy/cut and paste, text formatting, sentence highlighting, and etc. As mentioned before, the major functionalities of text editors are: inserting, deleting, and viewing text.
0 Comments
|
AuthorBarbara ArchivesCategories |