advanced linked lists deleting newline character requires the merging of two linesthe current line with the following one of course the newline character of the last line in the buffer cannot be deleted thusthis condition must first be checked before merging the two lines merging the two lines requires several steps firstthe newline character on the current line must be removed and the current line extended by appending to it the contents of the next line thenthe node and buffer entry for the next line must be removed from the doubly linked list this step is performed using the removenode(helper methodthe implementation of which is left as an exercise the helper method also handles the final step in merging the two lineswhich is to decrement the line count by one splitting line we conclude our discussion with the breakline(methodthe implementation of which is provided in lines - of listing this operation splits line into two lines at the current cursor position with the character at the cursor position becoming part of the new line figure illustrates the sample buffer after splitting the third line at the letter "iof the word "in curline (acurline (bfigure breaking line of text at the cursor position(athe sample buffer before the split and (bthe result after the split with the cursor position adjusted