zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 5cba7c8562a5646996ee022b249d829b68fb6870 (tree)
parent 4e78836d29260e915e767bc907ff7ba6c652ef5f
Author: dweiller <4678790+dweiller@users.noreply.github.com>
Date:   Thu, 23 Jan 2025 02:28:12 +1100

langref: document @memmove

Diffstat:
Mdoc/langref.html.in | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -5149,6 +5149,23 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val {#syntax#}std.crypto.secureZero{#endsyntax#}</p> {#header_close#} + {#header_open|@memmove#} + <pre>{#syntax#}@memmove(dest, source) void{#endsyntax#}</pre> + <p>This function copies bytes from one region of memory to another, but unlike + {#link|@memcpy#} the regions may overlap.</p> + <p>{#syntax#}dest{#endsyntax#} must be a mutable slice, a mutable pointer to an array, or + a mutable many-item {#link|pointer|Pointers#}. It may have any + alignment, and it may have any element type.</p> + <p>{#syntax#}source{#endsyntax#} must be a slice, a pointer to + an array, or a many-item {#link|pointer|Pointers#}. It may + have any alignment, and it may have any element type.</p> + <p>The {#syntax#}source{#endsyntax#} element type must have the same in-memory + representation as the {#syntax#}dest{#endsyntax#} element type.</p> + <p>Similar to {#link|for#} loops, at least one of {#syntax#}source{#endsyntax#} and + {#syntax#}dest{#endsyntax#} must provide a length, and if two lengths are provided, + they must be equal.</p> + {#header_close#} + {#header_open|@min#} <pre>{#syntax#}@min(...) T{#endsyntax#}</pre> <p>