Here you can find the source of firstIndexOfChar(String sqlString, BitSet keys, int startindex)
public static int firstIndexOfChar(String sqlString, BitSet keys, int startindex)
//package com.java2s; /*//from ww w . j a va2 s .c o m * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ import java.util.BitSet; public class Main { public static int firstIndexOfChar(String sqlString, BitSet keys, int startindex) { for (int i = startindex, size = sqlString.length(); i < size; i++) { if (keys.get(sqlString.charAt(i))) { return i; } } return -1; } public static int firstIndexOfChar(String sqlString, String string, int startindex) { BitSet keys = new BitSet(); for (int i = 0, size = string.length(); i < size; i++) { keys.set(string.charAt(i)); } return firstIndexOfChar(sqlString, keys, startindex); } }