Here you can find the source of splitDateText(String text)
static private String[] splitDateText(String text)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; public class Main { static private String[] splitDateText(String text) { java.util.List<String> list = new ArrayList<String>(); final int n = text.length(); int i = 0; int j = 0; for (; i < n;) { int i0 = i; for (; i < n; i++) { char c = text.charAt(i); if ((j & 1) == 0 ? (c < '0' || c > '9') : (c >= '0' && c <= '9')) break; }// ww w .j ava 2 s . com if (i <= i0) break; list.add(text.substring(i0, i).trim()); j++; } if (i < n) return null; return list.toArray(new String[list.size()]); } }