LibJS: Add a throwable StringBuilder::join method

This commit is contained in:
Timothy Flynn 2023-02-16 11:45:07 -05:00 committed by Tim Flynn
parent 4d10911f96
commit 153b793638
Notes: sideshowbarker 2024-07-17 10:16:43 +09:00

View File

@ -34,6 +34,13 @@ public:
return {};
}
template<class SeparatorType, class CollectionType>
ThrowCompletionOr<void> join(SeparatorType const& separator, CollectionType const& collection, StringView fmtstr = "{}"sv)
{
TRY_OR_THROW_OOM(m_vm, try_join(separator, collection, fmtstr));
return {};
}
using AK::StringBuilder::is_empty;
using AK::StringBuilder::string_view;
using AK::StringBuilder::trim;