2023-07-23 13:38:04 -03:00
|
|
|
/*
|
|
|
|
|
* 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>
|
2025-07-19 23:35:33 -03:00
|
|
|
#include <LibWeb/Export.h>
|
2024-03-01 04:49:04 -03:00
|
|
|
#include <LibWeb/WebIDL/ExceptionOr.h>
|
|
|
|
|
#include <LibWeb/WebIDL/Types.h>
|
2023-07-23 13:38:04 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
WEB_API Optional<i32> parse_integer(StringView string);
|
2024-11-30 21:04:32 -03:00
|
|
|
Optional<StringView> parse_integer_digits(StringView string);
|
2023-07-23 13:38:04 -03:00
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
WEB_API Optional<u32> parse_non_negative_integer(StringView string);
|
2024-11-30 21:04:32 -03:00
|
|
|
Optional<StringView> parse_non_negative_integer_digits(StringView string);
|
2023-07-23 13:38:04 -03:00
|
|
|
|
2023-11-15 15:54:01 -03:00
|
|
|
Optional<double> parse_floating_point_number(StringView string);
|
2025-07-26 13:19:56 -03:00
|
|
|
Optional<double> parse_floating_point_number(Utf16String const& string);
|
2023-11-15 15:54:01 -03:00
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
WEB_API bool is_valid_floating_point_number(StringView string);
|
2025-07-26 13:19:56 -03:00
|
|
|
bool is_valid_floating_point_number(Utf16String const& string);
|
2024-08-27 06:25:01 -03:00
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
WEB_API WebIDL::ExceptionOr<String> convert_non_negative_integer_to_string(JS::Realm&, WebIDL::Long);
|
2024-03-01 04:49:04 -03:00
|
|
|
|
2023-07-23 13:38:04 -03:00
|
|
|
}
|