StrFirst
Description
Access the first character of the string by value. Caller must ensure the string is non-empty.
Parameters
| Name | Direction | Description |
|---|---|---|
str |
in | String to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Str.Access.c:46:
// Test StrFirst function
bool test_str_first(void) {
WriteFmt("Testing StrFirst\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Str.Access.c:53:
// Get the first character
char first = StrFirst(&s);
// Check that the character is correct
Last updated on