Here you can find the source of startsWithIgnoreCase(String s, String prefix)
public static boolean startsWithIgnoreCase(String s, String prefix)
//package com.java2s; //License from project: Apache License public class Main { public static boolean startsWithIgnoreCase(String s, String prefix) { int length = prefix.length(); if (s.length() < length) return false; for (int i = 0; i < length; i++) { char c1 = s.charAt(i); char c2 = prefix.charAt(i); if (c1 == c2) continue; if (Character.toUpperCase(c1) != Character.toUpperCase(c2) && Character.toLowerCase(c1) != Character.toLowerCase(c2)) return false; }// w w w. jav a 2 s . c o m return true; } }