SdFat
|
Functions | |
char * | cpToMb (uint32_t cp, char *str, char *end) |
uint16_t | highSurrogate (uint32_t cp) |
bool | isHighSurrogate (uint16_t c) |
bool | isLowSurrogate (uint16_t c) |
bool | isSurrogate (uint16_t c) |
bool | isValidCp (uint32_t cp) |
uint16_t | lowSurrogate (uint32_t cp) |
const char * | mbToCp (const char *str, const char *end, uint32_t *rtn) |
const char * | mbToU16 (const char *str, const char *end, uint16_t *hs, uint16_t *ls) |
uint32_t | u16ToCp (uint16_t hs, uint16_t ls) |
Copyright (c) 2011-2020 Bill Greiman This file is part of the SdFat library for SD memory cards.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
char * FsUtf::cpToMb | ( | uint32_t | cp, |
char * | str, | ||
char * | end | ||
) |
Encodes a 32 bit code point as a UTF-8 sequence.
[in] | cp | code point to encode. |
[out] | str | location for UTF-8 sequence. |
[in] | end | location following last character of str. |
|
inline |
High surrogate for a code point.
cp | code point. |
|
inline |
Check for UTF-16 high surrogate.
[in] | c | UTF-16 unit.. |
|
inline |
Check for UTF-16 low surrogate.
[in] | c | UTF-16 unit.. |
|
inline |
Check for UTF-16 surrogate.
[in] | c | UTF-16 unit. |
|
inline |
Check for a valid code point.
[in] | cp | code point. |
|
inline |
Low surrogate for a code point.
cp | code point. |
const char * FsUtf::mbToCp | ( | const char * | str, |
const char * | end, | ||
uint32_t * | rtn | ||
) |
Get next code point from a UTF-8 sequence.
[in] | str | location for UTF-8 sequence. |
[in] | end | location following last character of str. May be nullptr if str is zero terminated. |
[out] | rtn | location for the code point. |
const char * FsUtf::mbToU16 | ( | const char * | str, |
const char * | end, | ||
uint16_t * | hs, | ||
uint16_t * | ls | ||
) |
Get next code point from a UTF-8 sequence as UTF-16.
[in] | str | location for UTF-8 sequence. |
[in] | end | location following last character of str. |
[out] | hs | location for the code point or high surrogate. |
[out] | ls | location for zero or high surrogate. |
|
inline |
Convert UFT-16 surrogate pair to code point.
[in] | hs | high surrogate. |
[in] | ls | low surrogate. |