Class JavaFloatParser

java.lang.Object
ch.randelshofer.fastdoubleparser.JavaFloatParser

public class JavaFloatParser extends Object
Parses a float value; the supported syntax is compatible with Float.valueOf(String).

See JavaDoubleParser for a description of the supported grammar.

Expected character lengths for values produced by Float.toString(float):

  • DecSignificand (IntegerPart + FractionPart): 1 to 8 digits
  • IntegerPart: 1 to 7 digits
  • FractionPart: 1 to 7 digits
  • SignedInteger in exponent: 1 to 2 digits
  • FloatingPointLiteral: 1 to 14 characters, e.g. "-1.2345678E-38"
Maximal input length supported by this parser:
  • FloatingPointLiteral with or without white space around it: Integer.MAX_VALUE - 4 = 2,147,483,643 characters.