public static double [ ] toDoubleArray ( String pString , String pDelimiters ) { if ( isEmpty ( pString ) ) { return new double [ 0 ] ; } // Some room for improvement here... String [ ] temp = toStringArray ( pString , pDelimiters ) ; double [ ] array = new double [ temp . length ] ; for ( int i = 0 ; i < array . length ; i ++ ) { array [ i ] = Double . valueOf ( temp [ i ] ) ; // Double.parseDouble() is 1.2... } return array ; }
Converts a comma - separated String to an array of doubles .