diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2025-09-13 19:32:52 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-17 20:12:03 -0700 |
| commit | c330d2bdde909a199ffff20293974e62454db239 (patch) | |
| tree | 258829a080e690e6c343a62d1d0a1a4c2c73b7df /lib/std | |
| parent | 92223ad36f4e2103b470b7e32bb2c61bc9e52904 (diff) | |
| download | zig-c330d2bdde909a199ffff20293974e62454db239.tar.gz zig-c330d2bdde909a199ffff20293974e62454db239.zip | |
mem.replace: Document that input/output cannot overlap
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/mem.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/mem.zig b/lib/std/mem.zig index 8ca34aa51c..3013af36f6 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -3831,6 +3831,7 @@ test rotate { /// Replace needle with replacement as many times as possible, writing to an output buffer which is assumed to be of /// appropriate size. Use replacementSize to calculate an appropriate buffer size. +/// The `input` and `output` slices must not overlap. /// The needle must not be empty. /// Returns the number of replacements made. pub fn replace(comptime T: type, input: []const T, needle: []const T, replacement: []const T, output: []T) usize { |
