Java String Split split(String s, String s1)

Here you can find the source of split(String s, String s1)

Description

split

License

Open Source License

Declaration

public static String[] split(String s, String s1) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static String[] split(String s, String s1) {
        StringTokenizer stringtokenizer = new StringTokenizer(s1, s);
        String as[] = new String[stringtokenizer.countTokens()];
        int i = 0;
        while (stringtokenizer.hasMoreTokens()) {
            as[i++] = stringtokenizer.nextToken();
        }/*from   www.  ja  v a  2s . com*/
        return as;
    }
}

Related

  1. split(String s)
  2. split(String s)
  3. split(String s)
  4. split(String s, int c)
  5. split(String s, String at)
  6. split(String s, String seperator)
  7. split(String s, String spliter, boolean removeEmptyItem)
  8. split(String s, String splitStr)
  9. split(String s, String splitter)