public int strStr(String haystack, String needle) {
		if (haystack.length() < needle.length())
			return -1;
		for (int i = 0; i <= haystack.length() - needle.length(); ++i) {
			int j = 0;
			boolean match = true;
			int ptr = i;
			for (; j < needle.length(); ++j) {
				if (haystack.charAt(ptr) != needle.charAt(j)) {
					match = false;
					break;
				}
				++ptr;
			}
			if (match)
				return i;
		}
		return -1;
	}