1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

AK: Add generation of roman numerals to AK::String

We now can generate roman numbers using String::roman_number_from()
similar to String::bijective_base_from().
This commit is contained in:
Tobias Christiansen 2021-07-04 17:15:27 +02:00 committed by Andreas Kling
parent 24e122590c
commit 87033ce7d1
2 changed files with 54 additions and 0 deletions

View file

@ -99,6 +99,7 @@ public:
[[nodiscard]] static String repeated(const StringView&, size_t count);
[[nodiscard]] static String bijective_base_from(size_t value, unsigned base = 26, StringView map = {});
[[nodiscard]] static String roman_number_from(size_t value);
template<class SeparatorType, class CollectionType>
[[nodiscard]] static String join(const SeparatorType& separator, const CollectionType& collection)