1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibUnicode: Parse and generate date, time, and date-time format patterns

This commit is contained in:
Timothy Flynn 2021-11-27 14:54:48 -05:00 committed by Linus Groh
parent 5c57341672
commit f471ecdbe9
6 changed files with 384 additions and 5 deletions

View file

@ -137,10 +137,11 @@ struct CanonicalLanguageID {
Vector<StringIndexType> variants {};
};
inline ErrorOr<Core::DirIterator> path_to_dir_iterator(String path)
inline ErrorOr<Core::DirIterator> path_to_dir_iterator(String path, StringView subpath = "main"sv)
{
LexicalPath lexical_path(move(path));
lexical_path = lexical_path.append("main"sv);
if (!subpath.is_empty())
lexical_path = lexical_path.append(subpath);
Core::DirIterator iterator(lexical_path.string(), Core::DirIterator::SkipParentAndBaseDir);
if (iterator.has_error())