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

com.tmsps.ne4springboot.util.NeStringUtils Maven / Gradle / Ivy

The newest version!
package com.tmsps.ne4springboot.util;

import cn.hutool.core.util.StrUtil;

/**
 *	@ClassName: NeStringUtils
 *	@Description: 
 *	@author: zhangwei(Mr.z)[email protected]
 *	@date: 2023/03/24
 *	@Copyright: 行歌信息	
 */
public class NeStringUtils {
	/**
	 * 	@Description: 两个字符串拼接
	 *	@author: zhangwei(Mr.z)[email protected]
	 *	@date: 2023/03/24
	 */
	public static String join(String previous, String next) {
		if (StrUtil.isAllBlank(previous, next)) {
			return "";
		}

		if (StrUtil.isBlank(previous) && StrUtil.isNotEmpty(next)) {
			return next;
		}

		if (StrUtil.isNotBlank(previous) && StrUtil.isEmpty(next)) {
			return previous;
		}
		return StrUtil.join(",", previous, next);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy