question: public static String [ ] splitString ( String source , char delimeter ) { String [ ] resultArray = null ; int delimeterIndex = source . indexOf ( delimeter ) ; if ( delimeterIndex < 0 ) { resultArray = new String [ 1 ] ; resultArray [ 0 ] = source ; } else { String firstStr = source . substring ( 0 , delimeterIndex ) ; String secondStr = source . substring ( delimeterIndex + 1 ) ; resultArray = new String [ 2 ] ; resultArray [ 0 ] = firstStr ; resultArray [ 1 ] = secondStr ; } return resultArray ; }
target:  Returns pair of String objects ( packed in as String array ) that are deparated by one delimeter character in passed source String object. If delimeter is not found array with one source String object is returned.