mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibJS: Add a throwable StringBuilder::join method
This commit is contained in:
parent
4d10911f96
commit
153b793638
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/153b793638 Pull-request: https://github.com/SerenityOS/serenity/pull/17494 Reviewed-by: https://github.com/linusg ✅
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue