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