StrInitCopy
- Function
- August 22, 2025
Table of Contents
StrInitCopy
StrInitCopy
Description
Copy data from src
to dst
Parameters
Name | Direction | Description |
---|---|---|
dst | out | Str object to copy into. |
src | in | Str object to copy from. |
Success
true
Failure
false
Usage example (Cross-references)
- In
Sys.c:85
:
dst->type = src->type;
StrInitCopy(&dst->name, &src->name);
return dst;
- In
Str.c:70
:
}
bool StrInitCopy(Str* dst, const Str* src) {
ValidateStr(src);
- In
Str.Init.c:164
:
// Test StrInitCopy function
bool test_str_init_copy(void) {
printf("Testing StrInitCopy\n");
Str src = StrInitFromZstr("Hello, World!");
- In
Str.Init.c:170
:
// Copy src to dst
bool success = StrInitCopy(&dst, &src);
// Validate both strings