package org.fouram.core.util;

import java.util.ArrayList;
import java.util.List;

public class StringUtil {

	public static List<String> splitList(String str, int size) {
		String[] arr = str.split(";");
		List<String> list = new ArrayList<>();
		for (int i = 0; i < size; i++) {
			String s = "";
			if (i < arr.length) {
				s = arr[i].trim();
			}
			list.add(s);
		}
		return list;
	}
	
	public static String formatNull(String str){
		if(str == null){
			return "";
		}
		return str;
	}
}
