void () { char[] chars = new char[]{'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd', 'A', 'B', 'C', 'D'}; assertEquals(2, StringUtil.indexOf(chars, 'c', 0, 12, false)); assertEquals(2, StringUtil.indexOf(chars, 'C', 0, 12, false)); assertEquals(10, StringUtil.indexOf(chars, 'C', 0, 12, true)); assertEquals(2, StringUtil.indexOf(chars, 'c', -42, 99, false)); }