JReadFloat

Table of Contents

JReadFloat

Description

Read a floating-point number from input string.

Parameters

NameDirectionDescription
siinCurrent reading position in input string
valoutPointer to f64 to store parsed value

Success

Returns StrIter advanced past parsed float

Failure

Returns original StrIter on error

Usage example (Cross-references)

    do {                                                                                                               \
    f64 my_flt = 0;                                                                                                \
    si         = JReadFloat((si), &my_flt);                                                                        \
    (f)        = my_flt;                                                                                           \
    } while (0)
    if (!StrCmpZstr(&key, (k))) {                                                                                  \
    f64 my_flt = 0;                                                                                            \
    si         = JReadFloat((si), &my_flt);                                                                    \
    (f)        = my_flt;                                                                                       \
    }                                                                                                              \
    }
    
    StrIter JReadFloat(StrIter si, f64* val) {
    if (!StrIterRemainingLength(&si)) {
    return si;

Share :

Related Posts

JReadInteger

JReadInteger Description Strictly read an integer from input string.

Read More

JSkipWhitespace

JSkipWhitespace Description Skip whitespace from current reading position.

Read More

JReadString

JReadString Description Read a quoted string, handling escape sequences.

Read More