Here you can find the source of getSecondField(String rowStr, char delimiter)
public static String getSecondField(String rowStr, char delimiter)
//package com.java2s; //License from project: Open Source License public class Main { public static String getSecondField(String rowStr, char delimiter) { int firstDelim = rowStr.indexOf(delimiter); if (firstDelim < 0) return null; int secondDelim = rowStr.indexOf(delimiter, firstDelim + 1); if (secondDelim < 0) return null; String field1 = rowStr.substring(firstDelim + 1, secondDelim).trim(); return field1; }/*from w ww .ja va 2 s . c om*/ }