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

Method key2pStr

ij/src/main/java/ij/plugin/ControlPanel.java:591–603  ·  view source on GitHub ↗
(String keyword)

Source from the content-addressed store, hash-verified

589 }
590
591 String key2pStr(String keyword) {
592 //keyword = keyword.replace('_',' '); // restore the spaces from underscores
593 StringTokenizer st = new StringTokenizer(keyword,".");
594 String result = "";
595 while(st.hasMoreTokens()) {
596 String token = st.nextToken();
597 result += token +", ";
598 }
599 result = result.substring(0,result.length()-2); // trim away the ending comma-space
600 result = "["+result+"]";
601 result = result.replace('_', ' ');
602 return result;
603 }
604
605
606 // Thank you, Wayne!

Callers 1

newPanelMethod · 0.95

Calls 4

substringMethod · 0.80
lengthMethod · 0.65
nextTokenMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected