|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Converts a base data type to another base data type. More...
#include <Convert.h>
Static Public Member Functions | |
| static Array< char > | FromBase64String (const char *s) |
| static Array< char > | FromBase64String (const String &s) |
| static String | ToBase64String (const Array< char > &inArray) |
| static bool | ToBoolean (bool value) |
| static bool | ToBoolean (const char *value) |
| static bool | ToBoolean (const String &value) |
| static bool | ToBoolean (double value) |
| static bool | ToBoolean (int value) |
| static bool | ToBoolean (long long value) |
| static unsigned char | ToByte (bool value) |
| static unsigned char | ToByte (const char *value) |
| static unsigned char | ToByte (const char *value, int fromBase) |
| static unsigned char | ToByte (const String &value) |
| static unsigned char | ToByte (const String &value, int fromBase) |
| static unsigned char | ToByte (double value) |
| static unsigned char | ToByte (int value) |
| static unsigned char | ToByte (long long value) |
| static unsigned char | ToByte (short value) |
| static unsigned char | ToByte (signed char value) |
| static unsigned char | ToByte (unsigned char value) |
| static char | ToChar (const char *value) |
| static char | ToChar (const String &value) |
| static char | ToChar (int value) |
| static char | ToChar (long long value) |
| static char | ToChar (unsigned short value) |
| static double | ToDouble (const char *value) |
| static double | ToDouble (const String &value) |
| static double | ToDouble (float value) |
| static double | ToDouble (int value) |
| static double | ToDouble (long long value) |
| static short | ToInt16 (bool value) |
| static short | ToInt16 (const char *value) |
| static short | ToInt16 (const char *value, int fromBase) |
| static short | ToInt16 (const String &value) |
| static short | ToInt16 (const String &value, int fromBase) |
| static short | ToInt16 (double value) |
| static short | ToInt16 (int value) |
| static short | ToInt16 (long long value) |
| static short | ToInt16 (short value) |
| static int | ToInt32 (bool value) |
| static int | ToInt32 (const char *value) |
| static int | ToInt32 (const char *value, int fromBase) |
| static int | ToInt32 (const String &value) |
| static int | ToInt32 (const String &value, int fromBase) |
| static int | ToInt32 (double value) |
| static int | ToInt32 (int value) |
| static int | ToInt32 (long long value) |
| static long long | ToInt64 (bool value) |
| static long long | ToInt64 (const char *value) |
| static long long | ToInt64 (const char *value, int fromBase) |
| static long long | ToInt64 (const String &value) |
| static long long | ToInt64 (const String &value, int fromBase) |
| static long long | ToInt64 (double value) |
| static long long | ToInt64 (int value) |
| static long long | ToInt64 (long long value) |
| static signed char | ToSByte (bool value) |
| static signed char | ToSByte (const char *value) |
| static signed char | ToSByte (const String &value) |
| static signed char | ToSByte (double value) |
| static signed char | ToSByte (int value) |
| static signed char | ToSByte (long long value) |
| static signed char | ToSByte (short value) |
| static signed char | ToSByte (signed char value) |
| static signed char | ToSByte (unsigned char value) |
| static float | ToSingle (const char *value) |
| static float | ToSingle (const String &value) |
| static float | ToSingle (double value) |
| static float | ToSingle (int value) |
| static float | ToSingle (long long value) |
| static String | ToString (bool value) |
| static String | ToString (char value) |
| static String | ToString (double value) |
| static String | ToString (float value) |
| static String | ToString (int value) |
| static String | ToString (int value, int toBase) |
| static String | ToString (long long value) |
| static String | ToString (long long value, int toBase) |
| static String | ToString (short value) |
| static String | ToString (signed char value) |
| static String | ToString (unsigned char value) |
| static String | ToString (unsigned int value) |
| static String | ToString (unsigned long long value) |
| static String | ToString (unsigned short value) |
| static unsigned short | ToUInt16 (bool value) |
| static unsigned short | ToUInt16 (const char *value) |
| static unsigned short | ToUInt16 (const String &value) |
| static unsigned short | ToUInt16 (double value) |
| static unsigned short | ToUInt16 (int value) |
| static unsigned short | ToUInt16 (long long value) |
| static unsigned int | ToUInt32 (bool value) |
| static unsigned int | ToUInt32 (const char *value) |
| static unsigned int | ToUInt32 (const String &value) |
| static unsigned int | ToUInt32 (double value) |
| static unsigned int | ToUInt32 (int value) |
| static unsigned int | ToUInt32 (long long value) |
| static unsigned long long | ToUInt64 (bool value) |
| static unsigned long long | ToUInt64 (const char *value) |
| static unsigned long long | ToUInt64 (const String &value) |
| static unsigned long long | ToUInt64 (double value) |
| static unsigned long long | ToUInt64 (int value) |
| static unsigned long long | ToUInt64 (long long value) |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Additional Inherited Members | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Converts a base data type to another base data type.
Provides static conversion methods between primitives (bool, byte, int, long, double, string), arbitrary number base radix conversions (binary, octal, decimal, hexadecimal), and RFC 4648 Base64 encoding. Thread-safe for all concurrent operations.
|
static |
Definition at line 388 of file Convert.cpp.
References DotNetDupe::System::String::String(), and FromBase64String().
Definition at line 392 of file Convert.cpp.
References DotNetDupe::System::DecodeBase64Loop(), and DotNetDupe::System::String::GetRawString().
Referenced by DotNetDupe::System::IdentityModel::Tokens::Jwt::DecodeBase64UrlToDict(), and FromBase64String().
Definition at line 325 of file Convert.cpp.
References DotNetDupe::System::String::String(), DotNetDupe::System::EncodeBase64Chunk4(), DotNetDupe::System::EncodeBase64Remainder(), DotNetDupe::System::Array< T >::GetData(), and DotNetDupe::System::Array< T >::GetLength().
Referenced by DotNetDupe::System::IdentityModel::Tokens::Jwt::ComputeJwtSignature(), DotNetDupe::System::IdentityModel::Tokens::Jwt::EncodeDictToBase64Url(), DotNetDupe::System::Net::Http::RestClient< TResource >::SetBasicAuthentication(), and DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Verify().
|
static |
Definition at line 26 of file Convert.cpp.
Referenced by ToBoolean().
|
static |
Definition at line 30 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToBoolean().
|
static |
Definition at line 31 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException().
|
static |
Definition at line 29 of file Convert.cpp.
|
static |
Definition at line 27 of file Convert.cpp.
|
static |
Definition at line 28 of file Convert.cpp.
|
static |
Definition at line 40 of file Convert.cpp.
|
static |
Definition at line 42 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToByte().
|
static |
Definition at line 43 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToByte().
|
static |
Definition at line 49 of file Convert.cpp.
References ToByte().
|
static |
Definition at line 50 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 48 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 46 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 47 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 45 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 44 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 41 of file Convert.cpp.
|
static |
Definition at line 89 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToChar().
|
static |
Definition at line 90 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), and DotNetDupe::System::String::GetLength().
|
static |
Definition at line 87 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 88 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 86 of file Convert.cpp.
Referenced by ToChar().
|
static |
Definition at line 99 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToDouble().
|
static |
Definition at line 100 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), and DotNetDupe::System::OverflowException::OverflowException().
|
static |
Definition at line 98 of file Convert.cpp.
|
static |
Definition at line 96 of file Convert.cpp.
Referenced by ToDouble().
|
static |
Definition at line 97 of file Convert.cpp.
|
static |
Definition at line 132 of file Convert.cpp.
|
static |
Definition at line 137 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt16().
|
static |
Definition at line 138 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt16().
|
static |
Definition at line 139 of file Convert.cpp.
References ToInt16().
|
static |
Definition at line 140 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 136 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 134 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 135 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 133 of file Convert.cpp.
|
static |
Definition at line 154 of file Convert.cpp.
Referenced by DotNetDupe::System::Data::SqlClient::SqlDataReader::GetInt32(), DotNetDupe::WebAppCore::Controllers::ControllerRouteBuilder< TController >::MapGet(), ToInt32(), ToInt32(), and ToInt32().
|
static |
Definition at line 158 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt32().
|
static |
Definition at line 159 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt32().
|
static |
Definition at line 160 of file Convert.cpp.
References ToInt32().
|
static |
Definition at line 161 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 157 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 155 of file Convert.cpp.
|
static |
Definition at line 156 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 175 of file Convert.cpp.
|
static |
Definition at line 179 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt64().
|
static |
Definition at line 180 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToInt64().
|
static |
Definition at line 181 of file Convert.cpp.
References ToInt64().
|
static |
Definition at line 182 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), and DotNetDupe::System::OverflowException::OverflowException().
|
static |
Definition at line 178 of file Convert.cpp.
|
static |
Definition at line 176 of file Convert.cpp.
|
static |
Definition at line 177 of file Convert.cpp.
|
static |
Definition at line 64 of file Convert.cpp.
Referenced by ToSByte().
|
static |
Definition at line 66 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToSByte().
|
static |
Definition at line 72 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 71 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 69 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 70 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 68 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 67 of file Convert.cpp.
|
static |
Definition at line 65 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 117 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToSingle().
|
static |
Definition at line 118 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), and DotNetDupe::System::OverflowException::OverflowException().
|
static |
Definition at line 116 of file Convert.cpp.
|
static |
Definition at line 114 of file Convert.cpp.
Referenced by ToSingle().
|
static |
Definition at line 115 of file Convert.cpp.
|
static |
Definition at line 253 of file Convert.cpp.
Referenced by DotNetDupe::System::Data::Common::DbParameterCollection::AddWithValue(), DotNetDupe::System::Data::Common::DbParameterCollection::AddWithValue(), DotNetDupe::System::IO::TextWriter::Write(), DotNetDupe::System::IO::TextWriter::Write(), DotNetDupe::System::IO::TextWriter::Write(), DotNetDupe::System::IO::TextWriter::Write(), and DotNetDupe::System::IO::TextWriter::Write().
|
static |
Definition at line 256 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 257 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 262 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 268 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 290 of file Convert.cpp.
References DotNetDupe::System::ToBaseString().
|
static |
Definition at line 269 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 293 of file Convert.cpp.
References DotNetDupe::System::ToBaseString().
|
static |
Definition at line 267 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 255 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 254 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 271 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 272 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 270 of file Convert.cpp.
References DotNetDupe::System::String::String().
|
static |
Definition at line 196 of file Convert.cpp.
Referenced by ToUInt16().
|
static |
Definition at line 200 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToUInt16().
|
static |
Definition at line 201 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 199 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 197 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 198 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 215 of file Convert.cpp.
Referenced by ToUInt32().
|
static |
Definition at line 219 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToUInt32().
|
static |
Definition at line 220 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::OverflowException::OverflowException(), and DotNetDupe::System::CheckRange().
|
static |
Definition at line 218 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 216 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 217 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 234 of file Convert.cpp.
Referenced by ToUInt64().
|
static |
Definition at line 238 of file Convert.cpp.
References DotNetDupe::System::String::String(), and ToUInt64().
|
static |
Definition at line 239 of file Convert.cpp.
References DotNetDupe::System::FormatException::FormatException(), and DotNetDupe::System::OverflowException::OverflowException().
|
static |
Definition at line 237 of file Convert.cpp.
|
static |
Definition at line 235 of file Convert.cpp.
References DotNetDupe::System::CheckRange().
|
static |
Definition at line 236 of file Convert.cpp.
References DotNetDupe::System::CheckRange().