Java String Split splitToInteger(String str)

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

Description

split To Integer

License

Open Source License

Declaration

private static List<Integer> splitToInteger(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<Integer> splitToInteger(String str) {
        String[] chars = str.split("");
        List<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < chars.length; i++) {
            try {
                list.add(new Integer(chars[i]));
            } catch (NumberFormatException nfe) {
                // do nothing
            }//from ww  w .j  ava  2s.  co m
        }
        return list;
    }
}

Related

  1. splitTags(String rawTags)
  2. splitTemplateName(String templateName)
  3. splitter(List list, final int L)
  4. splitTerms(String queryString)
  5. splitText(String text)
  6. splitTokens(final String targets)
  7. splitTokens(String text)
  8. splitToList(final String listString, final String split)
  9. splitToList(String s)