Here you can find the source of startsWithIgnoreCase(String startString, String anotherString)
Parameter | Description |
---|---|
startString | a parameter |
anotherString | a parameter |
public static boolean startsWithIgnoreCase(String startString, String anotherString)
//package com.java2s; public class Main { /**//from ww w . ja v a 2 s . com * check whether a string starts with anotherString (ignore case) * * @param startString * @param anotherString * @return */ public static boolean startsWithIgnoreCase(String startString, String anotherString) { int length = startString.length(); if (length > anotherString.length()) { return false; } if (startString.equalsIgnoreCase(anotherString.substring(0, length))) { return true; } else { return false; } } }