StrReverse
- Macro
- August 22, 2025
Table of Contents
StrReverse
StrReverse
Description
Reverse contents of this string.
Parameters
Name | Direction | Description |
---|---|---|
str | in,out | Str to be reversed. |
Success
str
Failure
NULL
Usage example (Cross-references)
- In
Str.Memory.c:139
:
// Test StrReverse function
bool test_str_reverse(void) {
printf("Testing StrReverse\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Memory.c:144
:
// Reverse the string
StrReverse(&s);
// Check that the string was reversed
- In
Str.Memory.c:154
:
// Reverse the string
StrReverse(&s);
// Check that the string was reversed
- In
Str.Memory.c:164
:
// Reverse the string
StrReverse(&s);
// Check that the string is unchanged
- In
Str.Memory.c:174
:
// Reverse the string
StrReverse(&s);
// Check that the string is still empty