mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
refactor: Move MakeUnorderedList into util/string.h to make it reusable
This commit is contained in:
@@ -64,6 +64,14 @@ inline std::string Join(const std::vector<std::string>& list, const std::string&
|
||||
return Join<std::string>(list, separator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an unordered multi-line list of items.
|
||||
*/
|
||||
inline std::string MakeUnorderedList(const std::vector<std::string>& items)
|
||||
{
|
||||
return Join(items, "\n", [](const std::string& item) { return "- " + item; });
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string does not contain any embedded NUL (\0) characters
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user