mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +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:
parent
24e122590c
commit
87033ce7d1
Notes:
sideshowbarker
2024-07-18 10:27:22 +09:00
Author: https://github.com/TobyAsE
Commit: 87033ce7d1
Pull-request: https://github.com/SerenityOS/serenity/pull/8434
Reviewed-by: https://github.com/MaxWipfli ✅
2 changed files with 54 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue