/** * Delete the char under the cursor or return -1 if no char was deleted. * * @return the deleted char * @throws java.io.IOException any IOException */ int del() throws IOException { int ret = appendDel(); if (ret != -1) { needFlush = true; } return ret; }
/** * Replace all the characters before the cursor by the provided char sequence. * * @param s the new char sequence * @return the l * @throws java.io.IOException any IOException */ String replace(CharSequence s) throws IOException { StringBuilder builder = new StringBuilder(); for (int i = appendDel();i != -1;i = appendDel()) { builder.append((char)i); needFlush = true; } appendData(s, 0, s.length()); return builder.reverse().toString(); }
/** * Delete the char under the cursor or return -1 if no char was deleted. * * @return the deleted char * @throws java.io.IOException any IOException */ int del() throws IOException { int ret = appendDel(); if (ret != -1) { needFlush = true; } return ret; }
/** * Delete the char under the cursor or return -1 if no char was deleted. * * @return the deleted char * @throws java.io.IOException any IOException */ int del() throws IOException { int ret = appendDel(); if (ret != -1) { needFlush = true; } return ret; }
/** * Replace all the characters before the cursor by the provided char sequence. * * @param s the new char sequence * @return the l * @throws java.io.IOException any IOException */ String replace(CharSequence s) throws IOException { StringBuilder builder = new StringBuilder(); for (int i = appendDel();i != -1;i = appendDel()) { builder.append((char)i); needFlush = true; } appendData(s, 0, s.length()); return builder.reverse().toString(); }
/** * Replace all the characters before the cursor by the provided char sequence. * * @param s the new char sequence * @return the l * @throws java.io.IOException any IOException */ String replace(CharSequence s) throws IOException { StringBuilder builder = new StringBuilder(); for (int i = appendDel();i != -1;i = appendDel()) { builder.append((char)i); needFlush = true; } appendData(s, 0, s.length()); return builder.reverse().toString(); }