Is one String containing another String - Android java.lang

Android examples for java.lang:String Contains

Description

Is one String containing another String

Demo Code

import android.text.Html;
import android.text.Spanned;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.regex.Pattern;

public class Main{


    public static boolean contains(String str1, String str2) {
        return str1 != null && str1.contains(str2);
    }//from  www  .  ja  va 2  s  .  co  m

}

Related Tutorials