Java tutorial
//package com.java2s; public class Main { /** * Returns 'true' if the pattern matches the src */ public static String countryMatch(Object src, Object pattern) { if (src.toString().trim().length() == 0) { return "false"; } boolean result = src.toString().toLowerCase().contains(pattern.toString().toLowerCase()); return String.valueOf(result); } }