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

com.wudaosoft.commons.utils.StringUtils Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/* Copyright(c)2010-2014 WUDAOSOFT.COM
 * 
 * Email:[email protected]
 * 
 * QQ:275100589
 */

package com.wudaosoft.commons.utils;

/**
 * 

* @author Changsoul.Wu * @date 2014-3-29 上午2:43:31 */ public class StringUtils { /** * @param t * @param split * @return */ public static String arrToString(T[] t, String split){ if(t == null){ return ""; } StringBuilder sb = new StringBuilder(); for (T t2 : t) { sb.append(t2).append(split); } String str = sb.toString(); if(!"".equals(split)) str = str.substring(0,str.length()-1); return str; } /** * @param t * @return */ public static String arrToString(T[] t){ return arrToString(t, ""); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy