Here you can find the source of startsWith(String partial, String possible)
public static boolean startsWith(String partial, String possible)
//package com.java2s; /**/* w w w.ja v a 2 s. c o m*/ * Copyright 2015 by UnoModding and Contributors * * This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/. */ public class Main { public static boolean startsWith(String partial, String possible) { return possible.regionMatches(true, 0, partial, 0, partial.length()); } }