Provide masks for interpreting status from charconvert functions.
More...
Namespaces |
namespace | bdlde |
Detailed Description
- Outline
-
-
- Purpose:
- Provide masks for interpreting status from charconvert functions.
-
- Classes:
-
- See also:
- Component bdlde_charconvertutf16, Component bdlde_charconvertucs2
-
- Description:
- This component provides a namespace for the
enum
type bdlde::CharConvertStatus::Enum
, which enumerates the set of bit-wise masks that can be used to interpret return values from translation functions in components bdlde_charconvertutf16
and bdlde_charconvertucs2
.
-
- Enumerators:
Name Description
------------------- ---------------------------------------------
k_INVALID_INPUT_BIT Invalid code points or sequences of bytes / words
were encountered in the input.
k_OUT_OF_SPACE_BIT The space provided for the output was
insufficient for the translation.
-
- Usage:
- In this section we show intended usage of this component.
-
- Example 1: Basic Syntax:
- The following snippets of code provide a simple illustration of
bdlde::CharConvertStatus
usage.
- First, we create a variable
value
of type bdlde::CharConvertStatus::Enum
and initialize it with the value 3, which is not a valid value of the enum
. Next, we store a pointer to its ASCII representation in a variable asciiValue
of type const char *
: Finally, we print value
to bsl::cout
. if (veryVerbose) {
bsl::cout << value << bsl::endl;
}
This statement produces the following output on stdout
: