Java String Split by Char splitStringToChars(String str)

Here you can find the source of splitStringToChars(String str)

Description

split String To Chars

License

Open Source License

Declaration

private static List<String> splitStringToChars(String str) 

Method Source Code


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

import java.util.ArrayList;

import java.util.List;

public class Main {
    private static List<String> splitStringToChars(String str) {
        List<String> split = new ArrayList<>(str.length());

        for (int i = 0; i < str.length(); ++i)
            split.add(str.substring(i, i + 1));
        return split;
    }/*from  ww w .j a  v a2s . c o m*/
}

Related

  1. splitOnCharArray(String value, String splitOn)
  2. SplitSearchString(String search_string, char split_char, boolean clear_exact_match_char)
  3. splitString(final String s, final char c, final boolean trimBlanks)
  4. splitString(String str, char sep)
  5. splitString(String string, char ch)
  6. splitTrim(String str, String limitChar)
  7. splitWithEscape(String s, String splitChars)