All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.iqiny.silly.common.util.StringUtils Maven / Gradle / Ivy

/*
 *  Copyright  iqiny.com
 *
 *  https://gitee.com/iqiny/silly
 *
 *  project name:silly-common
 *  project description:top silly project pom.xml file
 */
package com.iqiny.silly.common.util;

import com.iqiny.silly.common.SillyConstant;

import java.util.Collection;
import java.util.StringJoiner;

public abstract class StringUtils extends org.apache.commons.lang3.StringUtils {

    public static String myJoin(Collection list) {
        return myJoin(list, SillyConstant.ARRAY_SPLIT_STR);
    }

    public static String myJoin(Collection list, String split) {
        if (list == null) {
            return null;
        }

        StringJoiner sj = new StringJoiner(split);
        for (String s : list) {
            sj.add(s);
        }
        return sj.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy