Android String Split splitIt(String s)

Here you can find the source of splitIt(String s)

Description

split It

Declaration

public static String[] splitIt(String s) 

Method Source Code

//package com.java2s;

public class Main {
    public static String[] splitIt(String s) {

        String[] temp1 = new String[32];

        int i = 0, a = 0, b = 0, c = 0;

        while ((i < s.length() - 1) && b < 32) {
            a = i;//  w ww  . j  a  v  a 2s  .  c  om
            while (i < (s.length()) && s.charAt(i) != '&') {
                i++;
            }
            c = i;
            temp1[b] = s.substring(a, c);
            i++;
            b++;
        }
        String[] temp2 = new String[b];
        System.arraycopy(temp1, 0, temp2, 0, b);
        return temp2;
    }
}

Related

  1. stringToListByLine(final String fileContent)
  2. split(String str, String separatorChars)
  3. split(String str, char delimiter)
  4. split(String str, char separator)
  5. parseDelimitedList(String list, char delimiter)
  6. stringToList(String str, String delimiter)
  7. split(String str, String separator)