|
static size_t | GetBufferSizeLimit (void) |
| Returns the maximum buffer size supported by the SecureStr* functions More...
|
|
static size_t | GetStringLengthLimit (void) |
| Returns the limit of string length supported by SafeString operations More...
|
|
static bool | IsNullOrEmpty (const char *str) |
| Determines if str is a nullptr or the string is empty More...
|
|
static size_t | GetLength (std::span< const char > str) |
| Wrapper for the safe strnlen_s function. More...
|
|
static size_t | GetLength (const char *str, size_t bufferSize) |
| Wrapper for safe operation strnlen_s More...
|
|
static bool | TryGetLength (std::span< const char > str, size_t &result) |
| Wrapper for the safe strnlen_s function. More...
|
|
static bool | TryGetLength (const char *str, size_t bufferSize, size_t &result) |
| Wrapper for the safe strnlen_s function. More...
|
|
static void | Copy (std::span< char > destStr, const char *srcStr) |
| Wrapper for safe strcpy_s function. More...
|
|
static void | Copy (std::span< char > destStr, const char *srcStr, size_t count) |
| Wrapper for safe strcpy_s function. More...
|
|
static void | Copy (char *destStr, size_t bufferSize, const char *srcStr) |
| Wrapper for safe strcpy_s function More...
|
|
static void | Copy (char *destStr, size_t bufferSize, const char *srcStr, size_t count) |
| Wrapper for safe strcpy_s function More...
|
|
◆ Copy() [1/4]
void Arp::Base::Core::SafeString::Copy |
( |
char * |
destStr, |
|
|
size_t |
destBufferSize, |
|
|
const char * |
srcStr |
|
) |
| |
|
static |
Wrapper for safe strcpy_s
function
- Parameters
-
destStr | The pointer to the destination array |
destBufferSize | The size of the destination buffer |
srcStr | The pointer to the source string |
- Exceptions
-
◆ Copy() [2/4]
void Arp::Base::Core::SafeString::Copy |
( |
char * |
destStr, |
|
|
size_t |
destBufferSize, |
|
|
const char * |
srcStr, |
|
|
size_t |
count |
|
) |
| |
|
static |
Wrapper for safe strcpy_s
function
- Parameters
-
destStr | The pointer to the destination array |
destBufferSize | The size of the destination buffer |
srcStr | The pointer to the source string |
count | The maximal number of characters to copy |
- Exceptions
-
◆ Copy() [3/4]
void Arp::Base::Core::SafeString::Copy |
( |
std::span< char > |
dest, |
|
|
const char * |
src |
|
) |
| |
|
static |
Wrapper for safe strcpy_s
function.
- Parameters
-
dest | The span of the destination |
src | The pointer to the source string to copy. |
- Exceptions
-
◆ Copy() [4/4]
void Arp::Base::Core::SafeString::Copy |
( |
std::span< char > |
dest, |
|
|
const char * |
src, |
|
|
size_t |
count |
|
) |
| |
|
static |
Wrapper for safe strcpy_s
function.
- Parameters
-
dest | The span of the destination |
src | The pointer to the source string |
count | The number of characters to copy |
- Exceptions
-
◆ GetBufferSizeLimit()
size_t Arp::Base::Core::SafeString::GetBufferSizeLimit |
( |
void |
| ) |
|
|
static |
Returns the maximum buffer size supported by the SecureStr* functions
- Returns
- maximum buffer size supported by the SecureStr* functions
◆ GetLength() [1/2]
size_t Arp::Base::Core::SafeString::GetLength |
( |
const char * |
str, |
|
|
size_t |
bufferSize |
|
) |
| |
|
static |
Wrapper for safe operation strnlen_s
- Parameters
-
str | The pointer to the string to determine the length from. |
bufferSize | The size of the string buffer. |
- Returns
- The length of the string
- Exceptions
-
◆ GetLength() [2/2]
size_t Arp::Base::Core::SafeString::GetLength |
( |
std::span< const char > |
str | ) |
|
|
static |
Wrapper for the safe strnlen_s
function.
- Parameters
-
- Returns
- length of the string
- Exceptions
-
◆ GetStringLengthLimit()
size_t Arp::Base::Core::SafeString::GetStringLengthLimit |
( |
void |
| ) |
|
|
static |
Returns the limit of string length supported by SafeString
operations
- Returns
- The string length limit supported by the
SafeString
operations.
◆ IsNullOrEmpty()
bool Arp::Base::Core::SafeString::IsNullOrEmpty |
( |
const char * |
str | ) |
|
|
static |
Determines if str is a nullptr or the string is empty
- Parameters
-
str | The pointer to the string |
- Returns
true
if the string is empty or a nullptr
, otherwise false
.
- Exceptions
-
◆ TryGetLength() [1/2]
bool Arp::Base::Core::SafeString::TryGetLength |
( |
const char * |
str, |
|
|
size_t |
bufferSize, |
|
|
size_t & |
length |
|
) |
| |
|
static |
Wrapper for the safe strnlen_s
function.
- Parameters
-
str | The pointer to the string to determine the length from. |
bufferSize | The size of the string buffer. |
- Returns
true
if the length of the string fits into the buffer, otherwise false
.
◆ TryGetLength() [2/2]
bool Arp::Base::Core::SafeString::TryGetLength |
( |
std::span< const char > |
str, |
|
|
size_t & |
length |
|
) |
| |
|
static |
Wrapper for the safe strnlen_s
function.
- Parameters
-
str | span of the string |
length | The resulting length of the string |
- Returns
true
if the length of the string fits into the span, otherwise false
.
The documentation for this class was generated from the following files: