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

com.seejoke.core.utils.StringUtils Maven / Gradle / Ivy

There is a newer version: 0.3
Show newest version
package com.seejoke.core.utils;

import java.util.HashSet;

/**
 * string常用工具类
 *
 * @author yangzhongying
 * @version 1.0
 **/
public class StringUtils extends org.apache.commons.lang3.StringUtils {

    public static String[] distinct(String[] arr) {
        if (arr == null || arr.length == 0) {
            return arr;
        }
        HashSet set = new HashSet<>();
        for (String str : arr) {
            set.add(str);
        }
        return set.toArray(new String[0]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy