8#ifndef INCLUDED_BDLDE_CHARCONVERTUTF32
9#define INCLUDED_BDLDE_CHARCONVERTUTF32
213#include <bdlscm_version.h>
218#include <bsl_cstddef.h>
219#include <bsl_string.h>
220#include <bsl_string_view.h>
221#include <bsl_vector.h>
247 const char *srcString,
248 unsigned int errorWord =
'?',
275 const char *srcString,
276 unsigned int errorWord =
'?',
279#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
281 std::pmr::vector<unsigned int> *dstVector,
282 const char *srcString,
283 unsigned int errorWord =
'?',
288 unsigned int errorWord =
'?',
293 unsigned int errorWord =
'?',
296#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
298 std::pmr::vector<unsigned int> *dstVector,
300 unsigned int errorWord =
'?',
305 unsigned int *dstBuffer,
306 bsl::size_t dstCapacity,
307 const char *srcString,
308 bsl::size_t *numCodePointsWritten = 0,
309 unsigned int errorWord =
'?',
350 unsigned int *dstBuffer,
351 bsl::size_t dstCapacity,
353 bsl::size_t *numCodePointsWritten = 0,
354 unsigned int errorWord =
'?',
360 const unsigned int *srcString,
361 bsl::size_t *numCodePointsWritten = 0,
362 unsigned char errorByte =
'?',
387 const unsigned int *srcString,
388 bsl::size_t *numCodePointsWritten = 0,
389 unsigned char errorByte =
'?',
392#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
393 static int utf32ToUtf8(std::pmr::string *dstString,
394 const unsigned int *srcString,
395 bsl::size_t *numCodePointsWritten = 0,
396 unsigned char errorByte =
'?',
400 const unsigned int *srcString,
401 bsl::size_t srcStringLength,
402 bsl::size_t *numCodePointsWritten = 0,
403 unsigned char errorByte =
'?',
407 const unsigned int *srcString,
408 bsl::size_t srcStringLength,
409 bsl::size_t *numCodePointsWritten = 0,
410 unsigned char errorByte =
'?',
413#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
414 static int utf32ToUtf8(std::pmr::string *dstString,
415 const unsigned int *srcString,
416 bsl::size_t srcStringLength,
417 bsl::size_t *numCodePointsWritten = 0,
418 unsigned char errorByte =
'?',
423 const unsigned int *srcString,
424 bsl::size_t *numCodePointsWritten = 0,
425 unsigned char errorByte =
'?',
449 const unsigned int *srcString,
450 bsl::size_t *numCodePointsWritten = 0,
451 unsigned char errorByte =
'?',
454#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
456 std::pmr::vector<char> *dstVector,
457 const unsigned int *srcString,
458 bsl::size_t *numCodePointsWritten = 0,
459 unsigned char errorByte =
'?',
463 const unsigned int *srcString,
464 bsl::size_t srcStringLength,
465 bsl::size_t *numCodePointsWritten = 0,
466 unsigned char errorByte =
'?',
470 const unsigned int *srcString,
471 bsl::size_t srcStringLength,
472 bsl::size_t *numCodePointsWritten = 0,
473 unsigned char errorByte =
'?',
476#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
478 std::pmr::vector<char> *dstVector,
479 const unsigned int *srcString,
480 bsl::size_t srcStringLength,
481 bsl::size_t *numCodePointsWritten = 0,
482 unsigned char errorByte =
'?',
487 bsl::size_t dstCapacity,
488 const unsigned int *srcString,
489 bsl::size_t *numCodePointsWritten = 0,
490 bsl::size_t *numBytesWritten = 0,
491 unsigned char errorByte =
'?',
523 bsl::size_t dstCapacity,
524 const unsigned int *srcString,
525 bsl::size_t srcStringLength,
526 bsl::size_t *numCodePointsWritten = 0,
527 bsl::size_t *numBytesWritten = 0,
528 unsigned char errorByte =
'?',
Definition bslstl_stringview.h:441
Definition bslstl_string.h:1281
Definition bslstl_vector.h:1025
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlde_base64alphabet.h:118
Enum
Definition bdlde_byteorder.h:134
@ e_HOST
Definition bdlde_byteorder.h:144
Definition bdlde_charconvertutf32.h:241
static int utf8ToUtf32(bsl::vector< unsigned int > *dstVector, const char *srcString, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(std::vector< char > *dstVector, const unsigned int *srcString, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(std::string *dstString, const unsigned int *srcString, bsl::size_t srcStringLength, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf8ToUtf32(bsl::vector< unsigned int > *dstVector, const bsl::string_view &srcString, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(char *dstBuffer, bsl::size_t dstCapacity, const unsigned int *srcString, bsl::size_t srcStringLength, bsl::size_t *numCodePointsWritten=0, bsl::size_t *numBytesWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf8ToUtf32(std::vector< unsigned int > *dstVector, const bsl::string_view &srcString, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(bsl::vector< char > *dstVector, const unsigned int *srcString, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf8ToUtf32(unsigned int *dstBuffer, bsl::size_t dstCapacity, const bsl::string_view &srcString, bsl::size_t *numCodePointsWritten=0, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf8ToUtf32(unsigned int *dstBuffer, bsl::size_t dstCapacity, const char *srcString, bsl::size_t *numCodePointsWritten=0, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(std::string *dstString, const unsigned int *srcString, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(bsl::string *dstString, const unsigned int *srcString, bsl::size_t srcStringLength, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(bsl::string *dstString, const unsigned int *srcString, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(std::vector< char > *dstVector, const unsigned int *srcString, bsl::size_t srcStringLength, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf8ToUtf32(std::vector< unsigned int > *dstVector, const char *srcString, unsigned int errorWord='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(bsl::vector< char > *dstVector, const unsigned int *srcString, bsl::size_t srcStringLength, bsl::size_t *numCodePointsWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)
static int utf32ToUtf8(char *dstBuffer, bsl::size_t dstCapacity, const unsigned int *srcString, bsl::size_t *numCodePointsWritten=0, bsl::size_t *numBytesWritten=0, unsigned char errorByte='?', ByteOrder::Enum byteOrder=ByteOrder::e_HOST)