le_utf8.h
Go to the documentation of this file.
1 
126 //--------------------------------------------------------------------------------------------------
135 #ifndef LEGATO_UTF8_INCLUDE_GUARD
136 #define LEGATO_UTF8_INCLUDE_GUARD
137 
138 
139 //--------------------------------------------------------------------------------------------------
150 //--------------------------------------------------------------------------------------------------
151 ssize_t le_utf8_NumChars
152 (
153  const char* string
154 );
155 
156 
157 //--------------------------------------------------------------------------------------------------
164 //--------------------------------------------------------------------------------------------------
165 size_t le_utf8_NumBytes
166 (
167  const char* string
168 );
169 
170 
171 //--------------------------------------------------------------------------------------------------
178 //--------------------------------------------------------------------------------------------------
180 (
181  const char firstByte
182 );
183 
184 
185 //--------------------------------------------------------------------------------------------------
192 //--------------------------------------------------------------------------------------------------
193 static inline bool le_utf8_IsContinuationByte
194 (
195  const char byte
196 )
197 {
198  return ( (byte & 0xC0) == 0x80 );
199 }
200 
201 
202 //--------------------------------------------------------------------------------------------------
227 //--------------------------------------------------------------------------------------------------
229 (
230  char* destStr,
231  const char* srcStr,
232  const size_t destSize,
233  size_t* numBytesPtr
234 );
237 
238 
239 //--------------------------------------------------------------------------------------------------
262 //--------------------------------------------------------------------------------------------------
264 (
265  char* destStr,
266  const char* srcStr,
267  const size_t destSize,
268  size_t* destStrLenPtr
269 );
272 
273 
274 //--------------------------------------------------------------------------------------------------
290 //--------------------------------------------------------------------------------------------------
292 (
293  char* destStr,
294  const char* srcStr,
295  const char* subStr,
296  const size_t destSize,
297  size_t* numBytesPtr
298 );
301 
302 
303 //--------------------------------------------------------------------------------------------------
311 //--------------------------------------------------------------------------------------------------
313 (
314  const char* string
315 );
316 
317 
318 //--------------------------------------------------------------------------------------------------
327 //--------------------------------------------------------------------------------------------------
329 (
330  int* valuePtr,
331  const char* arg
332 );
333 
334 
335 #endif // LEGATO_UTF8_INCLUDE_GUARD
size_t le_utf8_NumBytesInChar(const char firstByte)
ssize_t le_utf8_NumChars(const char *string)
le_result_t
Definition: le_basics.h:35
bool le_utf8_IsFormatCorrect(const char *string)
le_result_t le_utf8_Copy(char *destStr, const char *srcStr, const size_t destSize, size_t *numBytesPtr)
le_result_t le_utf8_Append(char *destStr, const char *srcStr, const size_t destSize, size_t *destStrLenPtr)
le_result_t le_utf8_ParseInt(int *valuePtr, const char *arg)
static bool le_utf8_IsContinuationByte(const char byte)
Definition: le_utf8.h:194
size_t le_utf8_NumBytes(const char *string)
le_result_t le_utf8_CopyUpToSubStr(char *destStr, const char *srcStr, const char *subStr, const size_t destSize, size_t *numBytesPtr)