1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

dropEmptyInitThenConcatStringsSep: Update doc and deprecate

This commit is contained in:
Robert Hensing 2024-07-14 11:50:14 +02:00
parent 1c97718146
commit d40fdb5711

View file

@ -33,10 +33,14 @@ template<class C> C tokenizeString(std::string_view s, std::string_view separato
/**
* Concatenate the given strings with a separator between the
* elements.
* Ignore any empty strings at the start of the list, and then concatenate the
* given strings with a separator between the elements.
*
* @deprecated This function exists for historical reasons. You probably just
* want to use `concatStringsSep`.
*/
template<class C>
[[deprecated("Consider removing the empty string dropping behavior. If acceptable, use concatStringsSep instead.")]]
std::string dropEmptyInitThenConcatStringsSep(const std::string_view sep, const C & ss)
{
size_t size = 0;