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

Method indexOf

ij/src/main/java/ij/macro/Functions.java:2911–2924  ·  view source on GitHub ↗
(String s1)

Source from the content-addressed store, hash-verified

2909 }
2910
2911 int indexOf(String s1) {
2912 s1 = getStringFunctionArg(s1);
2913 String s2 = getString();
2914 int fromIndex = 0;
2915 if (interp.nextToken()==',') {
2916 fromIndex = (int)getLastArg();
2917 checkIndex(fromIndex, 0, s1.length()-1);
2918 } else
2919 interp.getRightParen();
2920 if (fromIndex==0)
2921 return s1.indexOf(s2);
2922 else
2923 return s1.indexOf(s2, fromIndex);
2924 }
2925
2926 int startsWithEndsWith(int type) {
2927 String s1 = getFirstString();

Callers 15

getFunctionValueMethod · 0.95
FunctionFinderMethod · 0.45
populateListMethod · 0.45
actionPerformedMethod · 0.45
runStringFunctionMethod · 0.45
abortMacroMethod · 0.45
removeBatchModeImageMethod · 0.45
getInfoMethod · 0.45
setPlotFontSizeMethod · 0.45
makeHighResolutionMethod · 0.45
setKeyDownMethod · 0.45

Calls 7

getStringFunctionArgMethod · 0.95
getStringMethod · 0.95
getLastArgMethod · 0.95
checkIndexMethod · 0.95
getRightParenMethod · 0.80
lengthMethod · 0.65
nextTokenMethod · 0.45

Tested by

no test coverage detected