Class TextEditor


  • public class TextEditor
    extends Object
    Simple class simulating actions of a text editor.
    Author:
    Herbert Prähofer
    • Constructor Detail

      • TextEditor

        public TextEditor()
    • Method Detail

      • addText

        public void addText​(int pos,
                            String textToAdd)
        Adds a text at a given position.
        Parameters:
        pos - the position
        textToAdd - the text to add
      • deleteText

        public void deleteText​(int pos,
                               int length)
        Deletes a text at a given position.
        Parameters:
        pos - the position
        length - the length of the text to delete