Checks if a string represents a floating-point number by looking for 'E', 'e', or '.' characters. @param str the string to check @return true if the string contains floating-point notation
(final String str)
| 740 | * @return true if the string contains floating-point notation |
| 741 | */ |
| 742 | public static boolean isStringFloat(final String str) { |
| 743 | int len = str.length(); |
| 744 | if (len > 1) { |
| 745 | for (int i = 0; i < len; i++) { |
| 746 | switch (str.charAt(i)) { |
| 747 | case 'E': |
| 748 | return true; |
| 749 | case 'e': |
| 750 | return true; |
| 751 | case '.': |
| 752 | return true; |
| 753 | } |
| 754 | } |
| 755 | } |
| 756 | return false; |
| 757 | } |
| 758 | |
| 759 | |
| 760 | /* |