+ * A partial check that the string is numeric - only checks the first
+ * character. Returns true if the first character is a digit, or if it is '.',
+ * '+' or '-' and not the only character. Otherwise returns false (including
+ * for an empty string). Note this is not a complete check as it returns true
+ * for (e.g.) "1A".
+ *
+ * @param f
+ * @return
+ */
+ public static boolean couldBeNumber(String f)
+ {
+ int len = f.length();
+ if (len == 0)
+ {
+ return false;
+ }
+ char ch = f.charAt(0);
+ switch (ch)
+ {
+ case '.':
+ case '+':
+ case '-':
+ return len > 1;
+ }
+ return (ch <= '9' && ch >= '0');
+ }
+
+ /**