nlib
|
Wrapper functions for safe use of C standard functions like strtol
and strtoul
.
More...
#include "nn/nlib/Config.h"
Go to the source code of this file.
Namespaces | |
nn::nlib | |
Implements common features and features that are highly platform-dependent. Also refer to nlib Platform APIs . nlib_ns is an alias. | |
Functions | |
errno_t | nn::nlib::StrTo (const char *s, int base, int32_t *v) noexcept |
Converts the string s into an int32_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, int64_t *v) noexcept |
Converts the string s into an int64_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, uint32_t *v) noexcept |
Converts the string s into a uint32_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, uint64_t *v) noexcept |
Converts the string s into a uint64_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, double *v) noexcept |
Converts the string s into a double type. More... | |
errno_t | nn::nlib::StrTo (const char *s, float *v) noexcept |
Converts the string s into a float type. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, int8_t *v) noexcept |
Converts the string s into an int8_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, int16_t *v) noexcept |
Converts the string s into an int16_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, uint8_t *v) noexcept |
Converts the string s into a uint8_t -type integer. More... | |
errno_t | nn::nlib::StrTo (const char *s, int base, uint16_t *v) noexcept |
Converts the string s into a uint16_t -type integer. More... | |
Wrapper functions for safe use of C standard functions like strtol
and strtoul
.
strtol
and strtoul
are popular ways to convert strings into numerical values, but you must note the following. strtol
and strtoul
may set errno and return an error value that is in the normal range of return values. strtol
and strtoul
skip leading white spaces. strtol
and strtoul
have different error values. strtoul
does not generate an error on negative numbers. Definition in file StrTo.h.
© 2013, 2014, 2015 Nintendo Co., Ltd. All rights reserved.