libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
struct | GblStringView |
Macros | |
#define | GBL_STRING_VIEW_NPOS |
#define | GBL_STRV(...) |
#define | GBL_STRING_VIEW_CSTR(view) |
#define | GBL_STRING_VIEW_CSTR_ALLOCA(view) |
GblStringView structure and related functions.
This file contains the GblStringView structure and related API. A GblStringView is an immutable slice of a string, containing simply a pointer to the string and its size. When doing non-mutating operations on strings, such as searching, this is the preferred string type for the job with the most detailed API.
Definition in file gimbal_string_view.h.
#define GBL_STRING_VIEW_NPOS |
Constant value used to signify the last position or an invalid position in a GblStringView.
Definition at line 36 of file gimbal_string_view.h.
#define GBL_STRV | ( | ... | ) |
Convenience shorthand macro for creating a GblStringView from an existing string or substring.
Definition at line 38 of file gimbal_string_view.h.
#define GBL_STRING_VIEW_CSTR | ( | view | ) |
Convenience macro for converting a GblStringView to a C string, elliding creation of a temporary when the view is already NULL terminated.
Definition at line 40 of file gimbal_string_view.h.
#define GBL_STRING_VIEW_CSTR_ALLOCA | ( | view | ) |
Convenience macro for creating a NULL-terminated C string from a GblStringView on the stack, using alloca()
Definition at line 42 of file gimbal_string_view.h.