Java String Split by Separator splitBySeparator(String path, String separator)

Here you can find the source of splitBySeparator(String path, String separator)

Description

split By Separator

License

Open Source License

Declaration

private static List<String> splitBySeparator(String path, String separator) 

Method Source Code

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

import java.util.Arrays;

import java.util.List;

public class Main {
    private static List<String> splitBySeparator(String path, String separator) {
        return Arrays.asList(path.split(separator.replace("\\", "\\\\")));
    }//  ww w  . j  a  v  a  2  s .c  o  m
}

Related

  1. split(String string, char separator)
  2. split(String strToSplit, String strSeparator, int iLimit)
  3. split(String text, String separators, String brackets)
  4. splitAll(String str, char separatorChar)
  5. splitAndTrim(String tags, String separator)
  6. splitByStringSeparator(String theString, String separatorString)
  7. splitDoubles(String str, String fieldSeparator)
  8. splitField(String fieldWithSeparator, String separator)
  9. splitInts(String string, String separator)