Numbers.h 746 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2023, Jonatan Klemets <jonatan.r.klemets@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <AK/String.h>
  9. #include <LibWeb/WebIDL/ExceptionOr.h>
  10. #include <LibWeb/WebIDL/Types.h>
  11. namespace Web::HTML {
  12. Optional<i32> parse_integer(StringView string);
  13. Optional<StringView> parse_integer_digits(StringView string);
  14. Optional<u32> parse_non_negative_integer(StringView string);
  15. Optional<StringView> parse_non_negative_integer_digits(StringView string);
  16. Optional<double> parse_floating_point_number(StringView string);
  17. bool is_valid_floating_point_number(StringView string);
  18. WebIDL::ExceptionOr<String> convert_non_negative_integer_to_string(JS::Realm&, WebIDL::Long);
  19. }