mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
mem.replace: Document that input/output cannot overlap
This commit is contained in:
parent
92223ad36f
commit
c330d2bdde
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
/// 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.
|
/// appropriate size. Use replacementSize to calculate an appropriate buffer size.
|
||||||
|
/// The `input` and `output` slices must not overlap.
|
||||||
/// The needle must not be empty.
|
/// The needle must not be empty.
|
||||||
/// Returns the number of replacements made.
|
/// Returns the number of replacements made.
|
||||||
pub fn replace(comptime T: type, input: []const T, needle: []const T, replacement: []const T, output: []T) usize {
|
pub fn replace(comptime T: type, input: []const T, needle: []const T, replacement: []const T, output: []T) usize {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue