mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
LibJS: Add a throwable StringBuilder::join method
This commit is contained in:
parent
4d10911f96
commit
153b793638
1 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,13 @@ public:
|
||||||
return {};
|
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::is_empty;
|
||||||
using AK::StringBuilder::string_view;
|
using AK::StringBuilder::string_view;
|
||||||
using AK::StringBuilder::trim;
|
using AK::StringBuilder::trim;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue