![]() |
pntr
Image manipulation library
|
Macros | |
| #define | PNTR_STRSTR strstr |
| #define | PNTR_STRCHR strchr |
| #define | PNTR_STRLEN strlen |
| #define | PNTR_STRSIZE(text) ((PNTR_STRLEN(text) + (size_t)1)) |
| #define | PNTR_STRCODEPOINT pntr_strcodepoint |
Typedefs | |
| typedef char | pntr_codepoint_t |
| #define PNTR_STRCHR strchr |
Returns a pointer to the first occurance of a character in a string.
By default, will use string.h's strchr. When PNTR_ENABLE_UTF8 is enabled, will be utf8chr.
| #define PNTR_STRCODEPOINT pntr_strcodepoint |
Sets out_codepoint to the current utf8 codepoint in str, and returns the address of the next utf8 codepoint after the current one in str.
When PNTR_ENABLE_UTF8 is enabled, will be utf8codepoint.
| #define PNTR_STRLEN strlen |
Returns the length of a string.
By default, will use string.h's strlen. When PNTR_ENABLE_UTF8 is enabled, will be utf8len.
| #define PNTR_STRSIZE | ( | text | ) | ((PNTR_STRLEN(text) + (size_t)1)) |
Calculates the amount of bytes in a string, including the null character.
By default, will use string.h's strlen(text) + 1. When PNTR_ENABLE_UTF8 is enabled, this will be utf8size.
| #define PNTR_STRSTR strstr |
Returns a pointer to the first occurrence of str2 in str1, or a null pointer if str2 is not part of str1.
By default, will use string.h's strstr. When PNTR_ENABLE_UTF8 is enabled, will be utf8str.
| str1 | (const char*) C string to be scanned. |
| str2 | (const char*) containing the sequence of characters to match. |
| typedef char pntr_codepoint_t |
A type representing a single character or UTF-8 codepoint.
With UTF-8, a single character can be up to 4 bytes, so having this type define that helps determine its size quickly.