Java tutorial
//package com.java2s; public class Main { public static boolean contains(String srcText, CharSequence targetText) { return srcText != null && srcText.contains(targetText); } }