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

Method trimKey

ij/src/main/java/ij/Macro.java:155–166  ·  view source on GitHub ↗
(String key)

Source from the content-addressed store, hash-verified

153 }
154
155 public static String trimKey(String key) {
156 if (key==null)
157 return key;
158 int index = key.indexOf(" ");
159 if (index>-1)
160 key = key.substring(0,index);
161 index = key.indexOf(":");
162 if (index>-1)
163 key = key.substring(0,index);
164 key = key.toLowerCase(Locale.US);
165 return key;
166 }
167
168 /** Evaluates 'code' and returns the output, or any error,
169 * as a String (e.g., Macro.eval("2+2") returns "4").

Callers 5

getValueMethod · 0.95
saveLabelMethod · 0.95
saveLabelMethod · 0.95
getNextBooleanMethod · 0.95
getNextBooleanMethod · 0.95

Calls 2

substringMethod · 0.80
indexOfMethod · 0.45

Tested by

no test coverage detected