L
Liz
I normally use strings. Just starting to use StringBuffer.
How can I do the following better? (Replace <cr> and <lf>
with <space>)
String s = DynamicPanel.dynamicCmdArea.getText(0, len);
StringBuffer ss = new StringBuffer(s);
int j = -1;
while ((j = ss.indexOf("\n")) != -1)
ss.setCharAt(j, ' ');
while ((j = ss.indexOf("\r")) != -1)
ss.setCharAt(j, ' ');
How can I do the following better? (Replace <cr> and <lf>
with <space>)
String s = DynamicPanel.dynamicCmdArea.getText(0, len);
StringBuffer ss = new StringBuffer(s);
int j = -1;
while ((j = ss.indexOf("\n")) != -1)
ss.setCharAt(j, ' ');
while ((j = ss.indexOf("\r")) != -1)
ss.setCharAt(j, ' ');