← Standard library

FloatParseOptions

struct FloatParseOptions
import FloatParseOptions from Wax;

Floating-point prefix-parser syntax choices. The default General grammar accepts decimal/fixed and scientific forms plus inf/nan, but does not skip whitespace or accept leading plus. Options do not require whole-input consumption; check the result position when that matters.

FloatParse.wax:781

Members

formatfield

public uint64 format

A combination of the exposed format bits. Prefer a named preset for ordinary parsing.

FloatParse.wax:785

decimalPointfield

public uint8 decimalPoint

The single byte used as the decimal separator, normally ASCII dot.

FloatParse.wax:789

constructorconstructor

public constructor ()

Selects General grammar and the dot decimal separator.

FloatParse.wax:795

Customconstructor

public constructor Custom (uint64 format, uint8 decimalPoint)

Stores explicit format bits and a one-byte decimal separator.

FloatParse.wax:804

Generalconstructor

public constructor General ()

Selects fixed and scientific decimal syntax with inf/nan allowed, dot decimal point, and no leading whitespace or plus.

FloatParse.wax:815

Jsonconstructor

public constructor Json ()

Selects JSON number syntax, rejecting inf/nan, leading plus, and leading zeros. The parser still accepts a prefix; check full consumption separately.

FloatParse.wax:824

JsonOrInfnanconstructor

public constructor JsonOrInfnan ()

Selects JSON number syntax with inf/nan additionally permitted.

FloatParse.wax:832

Fortranconstructor

public constructor Fortran ()

Selects Fortran-style syntax, including d/D and bare signed exponents.

FloatParse.wax:840

Scientificgetter

public static get Scientific() : uint64

Enables scientific exponent syntax. Without Fixed, an exponent is required.

FloatParse.wax:849

Fixedgetter

public static get Fixed() : uint64

Enables fixed decimal syntax. Combine with Scientific to allow optional exponents.

FloatParse.wax:853

NoInfnangetter

public static get NoInfnan() : uint64

Disables inf, infinity, and nan spellings.

FloatParse.wax:857

BasicJsongetter

public static get BasicJson() : uint64

Enables JSON lexical restrictions; combine with NoInfnan for the Json preset.

FloatParse.wax:861

BasicFortrangetter

public static get BasicFortran() : uint64

Enables Fortran exponent conventions.

FloatParse.wax:865

AllowLeadingPlusgetter

public static get AllowLeadingPlus() : uint64

Allows an initial plus sign.

FloatParse.wax:869

SkipWhiteSpacegetter

public static get SkipWhiteSpace() : uint64

Skips leading ASCII space, tab, newline, vertical tab, formfeed, and carriage return.

FloatParse.wax:873

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.