StrLen
StrLen
Description
Get string length in characters.
Parameters
| Name | Direction | Description |
|---|---|---|
str |
in | String to query. |
Success
Length of string.
Failure
Function cannot fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Str.Access.c:21:
// Test StrLen and StrEmpty functions
bool test_str_len_empty(void) {
WriteFmt("Testing StrLen and StrEmpty\n");
Str s = StrInit();- In
Str.Access.c:25:
Str s = StrInit();
bool result = (StrLen(&s) == 0);
result = result && StrEmpty(&s);- In
Str.Access.c:31:
StrPushBack(&s, 'i');
result = result && (StrLen(&s) == 2);
result = result && !StrEmpty(&s);- In
Str.Access.c:35:
StrClear(&s);
result = result && (StrLen(&s) == 0);
result = result && StrEmpty(&s);- In
Access.h:38:
/// TAGS: Str, Empty, Query
///
#define StrEmpty(str) (StrLen(str) == 0)
///
Last updated on