Convert a string to a label suitable for a ResultsTable without whitespace, quotes or commas, to avoid problems when saving and reading the table. Returns null if an empty string or null.
(String s)
| 4404 | /** Convert a string to a label suitable for a ResultsTable without whitespace, quotes or commas, |
| 4405 | * to avoid problems when saving and reading the table. Returns null if an empty string or null. */ |
| 4406 | static String replaceSpacesEtc(String s) { |
| 4407 | if (s == null) return null; |
| 4408 | s = s.trim().replaceAll("[\\s,]", "_").replace("\"","''"); |
| 4409 | if (s.length() == 0) return null; |
| 4410 | return s; |
| 4411 | } |
| 4412 | |
| 4413 | /** get the number of digits for writing a column to the results table or the clipboard */ |
| 4414 | static int getPrecision(float[] values) { |
no test coverage detected