1 package org.unicode.cldr.util; 2 3 import java.util.List; 4 5 import com.google.common.base.Splitter; 6 7 public class SplitToArray { 8 private Splitter splitter; 9 10 public SplitToArray(Splitter splitter) { 11 this.splitter = splitter; 12 } 13 14 String[] split(String source) { 15 List<String> parts = splitter.splitToList(source); 16 return parts.toArray(new String[parts.size()]); 17 } 18 } 19