Log.debugln("Got Delimited DataCell ("+start+","+termend+") (repeatable):["+valueString+"]");
    private ArrayList splitStringIntoStringObjects ( String valueListString,                                                      String delimiter,                                                     String repeatable,                                                      String terminatingDelimiter                                                   )    {       // the list we will return       ArrayList values = new ArrayList();       // parameters        int delimiterSize = delimiter.length();       char delimitChar0 = delimiter.charAt(0);       int termDelimiterSize = 0;       char termDelimitChar0;       int valueListSize = valueListString.length();        boolean isNotRepeatable = repeatable.equals("yes") ? false : true;       if(terminatingDelimiter != null) {          termDelimiterSize = terminatingDelimiter.length();          termDelimitChar0 = terminatingDelimiter.charAt(0);       }       // loop over the valueListString and derive values        int start = 0;       while ( start < valueListSize )       {          int stop = start + delimiterSize;          // safety, can happen          if(stop > valueListSize) stop = valueListSize;          if ( valueListString.substring(start, stop).compareTo(delimiter) == 0 )           {            // we hit a delimiter            start += delimiterSize;            if (isNotRepeatable) {                 // gather a value now.                // find the end of this substring                int end = valueListString.indexOf(delimitChar0, start);                int termend = 0;                if(terminatingDelimiter != null)                   termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);                String valueString;                if(termend == 0 || end < termend) {                   // can happen if no terminating delimiter                   if (end < 0) end = valueListSize;                   // derive our value from string                   valueString = valueListString.substring(start, end);                   // add the value to arrayList                    values.add(valueString);                   // this is the last value so terminate the while loop                    if ((end+delimiterSize) >= valueListSize ) break;                   start = end;                } else {                   // if (termend < 0) termend = valueListSize;                   valueString = valueListString.substring(start, termend);                   // add the value to arrayList                    values.add(valueString);                   // this is the last value so terminate the while loop                    if ((termend+termDelimiterSize) >= valueListSize ) break;                   start = termend;                }             }          } else if (termDelimiterSize > 0                        && valueListString.substring(start, start + termDelimiterSize).compareTo(terminatingDelimiter) == 0                    )           {              // we hit record terminator(delimiter)              start += termDelimiterSize;                        // we DONT repeat on record terminators (??)/*             if (isNotRepeatable) {                 // gather values now.Log.errorln("ISNOTREPEATABLE CHECK");                // find the end of this substring                int end = valueListString.indexOf(delimitChar0, start);                int termend = 0;                if(terminatingDelimiter != null)                   termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);Log.error("end:"+end+" termend:"+termend);                String valueString;                if(termend == 0 || end < termend) {                   // can happen if no terminating delimiter                   if (end < 0) end = valueListSize;                   // derive our value from string                   valueString = valueListString.substring(start, end);                   // add the value to arrayList                    values.add(valueString);Log.errorln(" DValue:"+valueString);                   // this is the last value so terminate the while loop                    if ((end+delimiterSize) >= valueListSize ) break;                   start = end;                } else {                   // if (termend < 0) termend = valueListSize;                   valueString = valueListString.substring(start, termend);                   // add the value to arrayList                    values.add(valueString);Log.errorln(" TValue:"+valueString);                   // this is the last value so terminate the while loop                    if ((termend+termDelimiterSize) >= valueListSize ) break;                   start = termend;                }*/          } else {             // we didnt hit a delimiter, gather values             // find the end of this substring             int end = valueListString.indexOf(delimitChar0, start);             int termend = 0;             if(terminatingDelimiter != null)                  termend = valueListString.indexOf(terminatingDelimiter.charAt(0), start);             String valueString;             if(termend == 0 || end < termend) {                // can happen if no terminating delimiter                if (end < 0) end = valueListSize;                // derive our value from string                valueString = valueListString.substring(start, end);                // add the value to arrayList                 values.add(valueString);                // this is the last value so terminate the while loop                 if ((end+delimiterSize) >= valueListSize ) break;                start = end;             } else {                // if (termend < 0) termend = valueListSize;                valueString = valueListString.substring(start, termend);                // add the value to arrayList                 values.add(valueString);                // this is the last value so terminate the while loop                 if ((termend+termDelimiterSize) >= valueListSize ) break;                start = termend;             }          }       }       return values;    }