MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / detabLine

Method detabLine

ij/src/main/java/ij/plugin/frame/Editor.java:795–810  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

793 }
794
795 String detabLine(String s) {
796 if (s.indexOf('\t')<0)
797 return s;
798 int tabSize = 4;
799 StringBuffer sb = new StringBuffer((int)(s.length()*1.25));
800 char c;
801 for (int i=0; i<s.length(); i++) {
802 c = s.charAt(i);
803 if (c=='\t') {
804 for (int j=0; j<tabSize; j++)
805 sb.append(' ');
806 } else
807 sb.append(c);
808 }
809 return sb.toString();
810 }
811
812 void undo() {
813 if (IJ.isWindows()) {

Callers 1

printStringMethod · 0.95

Calls 5

charAtMethod · 0.80
lengthMethod · 0.65
appendMethod · 0.65
indexOfMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected