Split string to sub String By Symbol - Android java.lang

Android examples for java.lang:String Split

Description

Split string to sub String By Symbol

Demo Code

import android.text.TextUtils;

public class Main{


    public static String[] subStringBySymbol(String str, String symbol) {
        if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(symbol)) {
            String[] strArray = str.split(symbol);
            return strArray;
        }/* w  w  w  .j  ava 2  s  .c o m*/
        return null;
    }

}

Related Tutorials