public int strStr(String haystack, String needle) {
		if (haystack == null || needle == null
				|| needle.length() > haystack.length()) {
			return -1;
		}
		if (haystack.isEmpty() && needle.isEmpty()) {
			return 0;
		} else if (needle.isEmpty()) {
			return 0;
		}
		char[] sr = haystack.toCharArray();
		char[] nd = needle.toCharArray();
		for (int i = 0; i < sr.length; i++) {
			if (sr[i] == nd[0]) {
				if (isMatch(sr, nd, i)) {
					return i;
				}
			}
		}
		return -1;
	}