int (String pattern, String text) { StringSearcher searcher = new StringSearcher(pattern, true, true, true); final int[] index = {-1}; LowLevelSearchUtil.processTexts(text, 0, text.length(), searcher, value -> { index[0] = value; return false; }); return index[0]; }