authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2025-01-23 02:28:12+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2025-04-26 13:34:17+10:00
log5cba7c8562a5646996ee022b249d829b68fb6870
treea59b010a90be0fdc7dd6ed5a6f88b55849c06d1a
parent4e78836d29260e915e767bc907ff7ba6c652ef5f

langref: document @memmove


1 files changed, 17 insertions(+), 0 deletions(-)

doc/langref.html.in+17
......@@ -5149,6 +5149,23 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
51495149 {#syntax#}std.crypto.secureZero{#endsyntax#}</p>
51505150 {#header_close#}
51515151
5152 {#header_open|@memmove#}
5153 <pre>{#syntax#}@memmove(dest, source) void{#endsyntax#}</pre>
5154 <p>This function copies bytes from one region of memory to another, but unlike
5155 {#link|@memcpy#} the regions may overlap.</p>
5156 <p>{#syntax#}dest{#endsyntax#} must be a mutable slice, a mutable pointer to an array, or
5157 a mutable many-item {#link|pointer|Pointers#}. It may have any
5158 alignment, and it may have any element type.</p>
5159 <p>{#syntax#}source{#endsyntax#} must be a slice, a pointer to
5160 an array, or a many-item {#link|pointer|Pointers#}. It may
5161 have any alignment, and it may have any element type.</p>
5162 <p>The {#syntax#}source{#endsyntax#} element type must have the same in-memory
5163 representation as the {#syntax#}dest{#endsyntax#} element type.</p>
5164 <p>Similar to {#link|for#} loops, at least one of {#syntax#}source{#endsyntax#} and
5165 {#syntax#}dest{#endsyntax#} must provide a length, and if two lengths are provided,
5166 they must be equal.</p>
5167 {#header_close#}
5168
51525169 {#header_open|@min#}
51535170 <pre>{#syntax#}@min(...) T{#endsyntax#}</pre>
51545171 <p>