Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static boolean findIgnoreCase(String str, String c) { if (isNullOrEmpty(str)) { return false; } return str.toLowerCase().indexOf(c.toLowerCase()) > -1; } public static boolean isNullOrEmpty(String str) { return (str == null || str.length() == 0); } public static boolean isNullOrEmpty(final Object str) { return (str == null || str.toString().length() == 0); } public static boolean isNullOrEmpty(final String... strs) { if (strs == null || strs.length == 0) { return true; } for (String str : strs) { if (str == null || str.length() == 0) { return true; } } return false; } }