Snapdragon® Telematics Application Framework (TelAF) Interface Specification
le_utf8.h
Go to the documentation of this file.
1 
129 //--------------------------------------------------------------------------------------------------
138 #ifndef LEGATO_UTF8_INCLUDE_GUARD
139 #define LEGATO_UTF8_INCLUDE_GUARD
140 
141 
142 //--------------------------------------------------------------------------------------------------
153 //--------------------------------------------------------------------------------------------------
154 ssize_t le_utf8_NumChars
155 (
156  const char* string
157 );
158 
159 
160 //--------------------------------------------------------------------------------------------------
167 //--------------------------------------------------------------------------------------------------
168 size_t le_utf8_NumBytes
169 (
170  const char* string
171 );
172 
173 
174 //--------------------------------------------------------------------------------------------------
181 //--------------------------------------------------------------------------------------------------
183 (
184  const char firstByte
185 );
186 
187 
188 //--------------------------------------------------------------------------------------------------
195 //--------------------------------------------------------------------------------------------------
196 static inline bool le_utf8_IsContinuationByte
197 (
198  const char byte
199 )
200 {
201  return ( (byte & 0xC0) == 0x80 );
202 }
203 
204 
205 //--------------------------------------------------------------------------------------------------
230 //--------------------------------------------------------------------------------------------------
232 (
233  char* destStr,
234  const char* srcStr,
235  const size_t destSize,
236  size_t* numBytesPtr
237 );
240 
241 
242 //--------------------------------------------------------------------------------------------------
265 //--------------------------------------------------------------------------------------------------
267 (
268  char* destStr,
269  const char* srcStr,
270  const size_t destSize,
271  size_t* destStrLenPtr
272 );
275 
276 
277 //--------------------------------------------------------------------------------------------------
293 //--------------------------------------------------------------------------------------------------
295 (
296  char* destStr,
297  const char* srcStr,
298  const char* subStr,
299  const size_t destSize,
300  size_t* numBytesPtr
301 );
304 
305 
306 //--------------------------------------------------------------------------------------------------
313 //--------------------------------------------------------------------------------------------------
315 (
316  const char* string
317 );
318 
319 
320 //--------------------------------------------------------------------------------------------------
329 //--------------------------------------------------------------------------------------------------
331 (
332  int* valuePtr,
333  const char* arg
334 );
335 
336 
337 //--------------------------------------------------------------------------------------------------
351 //--------------------------------------------------------------------------------------------------
353 (
354  uint32_t codePoint,
355  char* out,
356  size_t* outSize
357 );
362 
363 
364 //--------------------------------------------------------------------------------------------------
379 //--------------------------------------------------------------------------------------------------
381 (
382  const char* src,
383  size_t* byteLength,
384  uint32_t* codePoint
390 );
392 
393 #endif // LEGATO_UTF8_INCLUDE_GUARD
le_result_t le_utf8_DecodeUnicodeCodePoint(const char *src, size_t *byteLength, uint32_t *codePoint)
size_t le_utf8_NumBytesInChar(const char firstByte)
ssize_t le_utf8_NumChars(const char *string)
le_result_t le_utf8_ParseInt(int *valuePtr, const char *arg)
static bool le_utf8_IsContinuationByte(const char byte)
Definition: le_utf8.h:197
size_t le_utf8_NumBytes(const char *string)
bool le_utf8_IsFormatCorrect(const char *string)
le_result_t le_utf8_Append(char *destStr, const char *srcStr, const size_t destSize, size_t *destStrLenPtr)
le_result_t
Definition: le_basics.h:45
le_result_t le_utf8_CopyUpToSubStr(char *destStr, const char *srcStr, const char *subStr, const size_t destSize, size_t *numBytesPtr)
le_result_t le_utf8_EncodeUnicodeCodePoint(uint32_t codePoint, char *out, size_t *outSize)
le_result_t le_utf8_Copy(char *destStr, const char *srcStr, const size_t destSize, size_t *numBytesPtr)