|
| void | errPrint (FILE *out, const char *msg, bool addErrno, bool addBacktrace, const char *func, const char *file, const int line, const char *format,...) noexcept |
| |
| std::string | format_string (const char *format,...) noexcept |
| | Returns a (non-truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
|
| |
| std::string | format_string_h (const std::size_t strLenHint, const char *format,...) noexcept |
| | Returns a (non-truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
|
| |
| std::string | format_string_n (const std::size_t maxStrLen, const char *format,...) noexcept |
| | Returns a (potentially truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
|
| |
| std::string | vformat_string_h (const std::size_t strLenHint, const char *format, va_list args) noexcept |
| |
| std::string | vformat_string_n (const std::size_t maxStrLen, const char *format, va_list args) noexcept |
| |
| std::string jau::unsafe::format_string_n |
( |
const std::size_t | maxStrLen, |
|
|
const char * | format, |
|
|
| ... ) |
|
noexcept |
Returns a (potentially truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
This variant doesn't validate format against given arguments, see jau::format_string_n.
Resulting string is truncated to min(maxStrLen, formatLen), with formatLen being the given formatted string length of output w/o limitation.
- Parameters
-
| maxStrLen | maximum resulting string length |
| format | printf() compliant format string |
| args | optional arguments matching the format string |
Definition at line 579 of file basic_types.cpp.
| std::string jau::unsafe::format_string_h |
( |
const std::size_t | strLenHint, |
|
|
const char * | format, |
|
|
| ... ) |
|
noexcept |
Returns a (non-truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
This variant doesn't validate format against given arguments, see jau::format_string_h.
Resulting string size matches formated output w/o limitation.
- Parameters
-
| strLenHint | initially used string length w/o EOS |
| format | printf() compliant format string |
| args | optional arguments matching the format string |
Definition at line 625 of file basic_types.cpp.
| std::string jau::unsafe::format_string |
( |
const char * | format, |
|
|
| ... ) |
|
noexcept |
Returns a (non-truncated) string according to snprintf() formatting rules and variable number of arguments following the format argument while utilizing the unsafe vsnprintf.
This variant doesn't validate format against given arguments, see jau::format_string.
Resulting string size matches formated output w/o limitation.
- Parameters
-
| format | printf() compliant format string |
| args | optional arguments matching the format string |
- Examples
- test_stringfmt_format.cpp.
Definition at line 633 of file basic_types.cpp.