Here you can find the source of toArray(String emails)
Parameter | Description |
---|---|
emails | a parameter |
public static String[] toArray(String emails)
//package com.java2s; //License from project: Open Source License public class Main { /**//w ww . j av a2 s . c om * Helper method to convert comma delimeted list of email strings to array * @param emails * @return array */ public static String[] toArray(String emails) { if (emails == null) return new String[0]; String[] tmp = emails.split(","); for (int i = 0; i < tmp.length; i++) { tmp[i] = tmp[i].trim(); } return tmp; } }