| 392 | |
| 393 | template <class TCounter, class S> |
| 394 | TBlob ConstructFromString(S&& s) { |
| 395 | using TBase = TStringBlobBase<TCounter>; |
| 396 | auto base = MakeHolder<TBase>(std::forward<S>(s)); |
| 397 | |
| 398 | TBlob ret(base->String().data(), base->String().size(), base.Get()); |
| 399 | Y_UNUSED(base.Release()); |
| 400 | |
| 401 | return ret; |
| 402 | } |
| 403 | |
| 404 | TBlob TBlob::FromStringSingleThreaded(const TString& s) { |
| 405 | return ConstructFromString<TSimpleCounter>(s); |