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

Method zapGremlins

ij/src/main/java/ij/plugin/frame/Fitter.java:265–280  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

263 }
264
265 String zapGremlins(String text) {
266 char[] chars = new char[text.length()];
267 chars = text.toCharArray();
268 int count=0;
269 for (int i=0; i<chars.length; i++) {
270 char c = chars[i];
271 if (c!='\n' && c!='\t' && (c<32||c>127)) {
272 count++;
273 chars[i] = ' ';
274 }
275 }
276 if (count>0)
277 return new String(chars);
278 else
279 return text;
280 }
281
282 public void keyTyped (KeyEvent e) {}
283 public void keyReleased (KeyEvent e) {}

Callers 1

getDataMethod · 0.95

Calls 1

lengthMethod · 0.65

Tested by

no test coverage detected