public static long [ ] toLongArray ( String pString , String pDelimiters ) { if ( isEmpty ( pString ) ) { return new long [ 0 ] ; } // Some room for improvement here... String [ ] temp = toStringArray ( pString , pDelimiters ) ; long [ ] array = new long [ temp . length ] ; for ( int i = 0 ; i < array . length ; i ++ ) { array [ i ] = Long . parseLong ( temp [ i ] ) ; } return array ; }
Converts a comma - separated String to an array of longs .