Here you can find the source of tokenize(String string, String splitOn)
Parameter | Description |
---|---|
string | string to tokenize |
splitOn | string to split the string on. |
public static String[] tokenize(String string, String splitOn)
//package com.java2s; //License from project: Apache License public class Main { /** Tokenize the passed in string. *// w w w .ja v a 2 s.com * @param string string to tokenize * @param splitOn string to split the string on. * @return an array of String tokens. */ public static String[] tokenize(String string, String splitOn) { return string.replace(" ", "").split(splitOn); } }