separateFromLocale

Separate key name into non-localized key and locale name. If key is not localized returns original key and empty string.

@nogc @trusted pure nothrow
Tuple!(string, string)
separateFromLocale
(
string key
)

Return Value

Type: Tuple!(string, string)

tuple of key and locale name.

Examples

assert(separateFromLocale("Name[ru_RU]") == tuple("Name", "ru_RU"));
assert(separateFromLocale("Name") == tuple("Name", string.init));

See Also

localizedKey

Meta