Here you can find the source of startsWithAt(String text, String toFind, int offset)
private static boolean startsWithAt(String text, String toFind, int offset)
//package com.java2s; //License from project: Open Source License public class Main { private static boolean startsWithAt(String text, String toFind, int offset) { for (int i = 0; i < toFind.length(); i++) { if (offset + i >= text.length() || text.charAt(offset + i) != toFind.charAt(i)) { return false; }//from w w w. j a v a2 s . c o m } return true; } }