aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/split.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-26 21:12:25 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-31 23:01:40 -0400
commitabd5e7dec039386628223f886b33047734172c8d (patch)
treeca3aecd64e1e9375ab6ed48d4a7dc54ac83b584d /src/libutil/split.hh
parent8ae9d669409851acb6de39335b11a95a991eae6d (diff)
Extend internal API docs, part 2
Picking up from #8111. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Diffstat (limited to 'src/libutil/split.hh')
-rw-r--r--src/libutil/split.hh10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libutil/split.hh b/src/libutil/split.hh
index 87a23b13e..a582fdbe3 100644
--- a/src/libutil/split.hh
+++ b/src/libutil/split.hh
@@ -7,10 +7,12 @@
namespace nix {
-// If `separator` is found, we return the portion of the string before the
-// separator, and modify the string argument to contain only the part after the
-// separator. Otherwise, we return `std::nullopt`, and we leave the argument
-// string alone.
+/**
+ * If `separator` is found, we return the portion of the string before the
+ * separator, and modify the string argument to contain only the part after the
+ * separator. Otherwise, we return `std::nullopt`, and we leave the argument
+ * string alone.
+ */
static inline std::optional<std::string_view> splitPrefixTo(std::string_view & string, char separator) {
auto sepInstance = string.find(separator);