29 template<
typename ArgType>
40 constexpr bool operator()(
auto const& unused)
const noexcept
57 ice::String const lang =
_data.substr(lang_start + 1, lang_end - lang_start - 1);
61 if (lang_arg_end != std::string_view::npos && lang_arg_end > 1)
70 args.get(
id).visit(lang_arg_visitor);
90 ice::nindex const path_sep = in_str.find_first_of(
'/');
92 out_path = (path_sep + 1).
u8();
97 out_key = key.
size().u8();
100 out_hash =
ice::hash32(in_str.substr(key_sep + 1));
105 str = str.
substr(key_sep);
113 out_flags = flags_sep.
u8() - 1u;
114 out_fallback = (str.
size() - flags_sep).u8() - 1u;
118 out_flags = str.
size().u8() - 1u;
124 out_fallback = str.
size().u8() - 1u;
#define ICE_ASSERT_CORE(expression)
Definition assert_core.hxx:43
Definition i18n_detail.hxx:27
Definition i18n_detail.hxx:6
constexpr void parse(ice::String in_str, ice::u32 &out_hash, ice::u8 &out_path, ice::u8 &out_key, ice::u8 &out_flags, ice::u8 &out_fallback) noexcept
Definition i18n_detail.hxx:81
constexpr auto strptr_size(CharType const *str) noexcept -> ice::ncount::base_type
Definition string_concepts.hxx:72
ice::BasicString< char > String
Definition string.hxx:82
std::int32_t i32
Definition types.hxx:21
constexpr auto hash32(ice::String value) noexcept -> ice::u32
Definition string.hxx:105
std::uint32_t u32
Definition types.hxx:26
std::uint8_t u8
Definition types.hxx:24
static constexpr ice::nindex_invalid_t nindex_none
Definition nindex.hxx:56
constexpr auto size() const noexcept -> SizeType
Definition string.hxx:57
SizeType::base_type _count
Definition string.hxx:26
constexpr auto data() const noexcept -> ValueType *
Definition string.hxx:56
ValueType * _data
Definition string.hxx:25
ice::String _data
Definition i18n_detail.hxx:23
constexpr I18NFlags(ice::String data) noexcept
Definition i18n_detail.hxx:10
constexpr auto language(fmt::format_args const &args) const noexcept -> ice::String
Definition i18n_detail.hxx:48
constexpr bool operator==(ice::String rhs) const noexcept
Definition i18n_detail.hxx:19
constexpr auto u8() const noexcept
Definition nvalue.hxx:111
constexpr bool is_valid(this Self self) noexcept
Definition nvalue.hxx:86
constexpr auto value_or(this Self self, ice::concepts::NValueCompatibleType auto fallback) noexcept
Definition nvalue.hxx:89
constexpr bool not_empty(this Self const &self) noexcept
Definition readonly_operations.hxx:22
constexpr auto find_first_of(this Self const &self, typename Self::CharType character_value, ice::nindex start=0) noexcept -> ice::nindex
Definition readonly_operations.hxx:75
constexpr auto back(this Self const &self) noexcept -> typename Self::CharType
Definition readonly_operations.hxx:34
constexpr auto substr(this Self const &self, ice::nindex pos, ice::ncount len={}) noexcept -> typename Self::StringType
Definition readonly_operations.hxx:40