ladybird/Libraries/LibWeb/HTML/Numbers.h
Timothy Flynn c8888609f4
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibWeb: Port the FormAssociatedElement value to UTF-16
This porting effort makes it pretty clear we will want a UTF-16-aware
GenericLexer. But for now, we can actually make ASCII assumptions about
what we are parsing, and act accordingly.
2025-07-28 12:25:11 +02:00

30 lines
883 B
C++

/*
* Copyright (c) 2023, Jonatan Klemets <jonatan.r.klemets@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <AK/String.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
#include <LibWeb/WebIDL/Types.h>
namespace Web::HTML {
Optional<i32> parse_integer(StringView string);
Optional<StringView> parse_integer_digits(StringView string);
Optional<u32> parse_non_negative_integer(StringView string);
Optional<StringView> parse_non_negative_integer_digits(StringView string);
Optional<double> parse_floating_point_number(StringView string);
Optional<double> parse_floating_point_number(Utf16String const& string);
bool is_valid_floating_point_number(StringView string);
bool is_valid_floating_point_number(Utf16String const& string);
WebIDL::ExceptionOr<String> convert_non_negative_integer_to_string(JS::Realm&, WebIDL::Long);
}