mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
LibUnicode: Generate a list of available currencies
This commit is contained in:
parent
481ced53d8
commit
bb0f548614
3 changed files with 7 additions and 0 deletions
|
@ -986,6 +986,7 @@ static void generate_unicode_locale_implementation(Core::File& file, UnicodeLoca
|
|||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibUnicode/CurrencyCode.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/UnicodeLocale.h>
|
||||
|
||||
|
@ -1019,6 +1020,8 @@ struct Patterns {
|
|||
};
|
||||
)~~~");
|
||||
|
||||
generate_available_values(generator, "get_available_currencies"sv, locale_data.currencies);
|
||||
|
||||
locale_data.unique_display_patterns.generate(generator, "DisplayPatternImpl"sv, "s_display_patterns"sv, 30);
|
||||
locale_data.unique_language_lists.generate(generator, s_string_index_type, "s_language_lists"sv);
|
||||
locale_data.unique_territory_lists.generate(generator, s_string_index_type, "s_territory_lists"sv);
|
||||
|
|
|
@ -203,4 +203,6 @@ Optional<CurrencyCode> get_currency_code(StringView currency)
|
|||
return currency_codes.get(currency);
|
||||
}
|
||||
|
||||
Span<StringView const> __attribute__((weak)) get_available_currencies() { return {}; }
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
|
||||
namespace Unicode {
|
||||
|
@ -17,5 +18,6 @@ struct CurrencyCode {
|
|||
};
|
||||
|
||||
Optional<CurrencyCode> get_currency_code(StringView currency);
|
||||
Span<StringView const> get_available_currencies();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue