squareball/sb-utf8.h File Reference
UTF-8 utilities.
More...
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "sb-string.h"
Go to the source code of this file.
Detailed Description
UTF-8 utilities.
Function Documentation
size_t sb_utf8_bom_length |
( |
const uint8_t * |
str, |
|
|
size_t |
len | |
|
) |
| | |
Function that returns the length of the UTF-8 BOM, if found in the string.
- Parameters:
-
| str | The string. |
| len | Length of str . |
- Returns:
- The length of the UTF-8 BOM, or
0
.
bool sb_utf8_validate |
( |
const uint8_t * |
str, |
|
|
size_t |
len | |
|
) |
| | |
Function that checks if a string is UTF-8 encoded.
- Parameters:
-
| str | The string. |
| len | Length of str . |
- Returns:
- A boolean
true
if the string is UTF-8 encoded.
Function that checks if a string object's content is UTF-8 encoded.
- Parameters:
-
- Returns:
- A boolean
true
if the string is UTF-8 encoded.