11 #include <mrpt/config.h> 37 char* buf,
size_t bufSize,
const char*
format,
44 char* buf,
size_t bufSize,
const char*
format, va_list args) noexcept;
50 char* buf,
size_t bufSize,
const char*
format, va_list args) noexcept;
55 FILE*
fopen(
const char* fileName,
const char* mode) noexcept;
60 FILE*
fopen(
const std::string& fileName,
const char* mode) noexcept;
75 char*
strcat(
char* dest,
size_t destSize,
const char* source) noexcept;
80 char*
strcpy(
char* dest,
size_t destSize,
const char* source) noexcept;
85 int _strcmp(
const char* str1,
const char* str2) noexcept;
90 int _strcmpi(
const char* str1,
const char* str2) noexcept;
95 int _strncmp(
const char* str,
const char* subStr,
size_t count) noexcept;
100 int _strnicmp(
const char* str,
const char* subStr,
size_t count) noexcept;
104 int64_t
_strtoll(
const char* nptr,
char** endptr,
int base);
108 uint64_t
_strtoull(
const char* nptr,
char** endptr,
int base);
112 time_t
timegm(
struct tm* tm);
117 void* dest,
size_t destSize,
const void* src,
size_t copyCount) noexcept;
122 int getch() noexcept;
127 bool kbhit() noexcept;
139 const std::string& msg =
140 std::string(
"Press any key to continue...")) noexcept;
189 const std::string& command, std::string* output =
nullptr,
190 const std::string& mode =
"r");
int int vsprintf(char *buf, size_t bufSize, const char *format, va_list args) noexcept
An OS-independent version of vsprintf (Notice the bufSize param, which may be ignored in some compile...
int getch() noexcept
An OS-independent version of getch, which waits until a key is pushed.
std::string std::string format(std::string_view fmt, ARGS &&... args)
int _strncmp(const char *str, const char *subStr, size_t count) noexcept
An OS-independent version of strncmp.
int void fclose(FILE *f)
An OS-independent version of fclose.
char * strcat(char *dest, size_t destSize, const char *source) noexcept
An OS-independent version of strcat.
time_t timegm(struct tm *tm)
An OS-independent version of timegm (which is not present in all compilers): converts a time structur...
int _strnicmp(const char *str, const char *subStr, size_t count) noexcept
An OS-independent version of strnicmp.
void setConsoleColor(TConsoleColor color, bool changeStdErr=false)
Changes the text color in the console for the text written from now on.
std::string MRPT_getCompilationDate()
Returns the MRPT source code timestamp, according to the Reproducible-Builds specifications: https://...
char * strcpy(char *dest, size_t destSize, const char *source) noexcept
An OS-independent version of strcpy.
std::string find_mrpt_shared_dir()
Finds the "[MRPT]/share/mrpt/" directory, if available in the system.
void clearConsole()
Clears the console window.
TConsoleColor
For use in setConsoleColor.
int fprintf(FILE *fil, const char *format,...) noexcept MRPT_printf_format_check(2
An OS-independent version of fprintf.
void pause(const std::string &msg=std::string("Press any key to continue...")) noexcept
Shows the message "Press any key to continue" (or other custom message) to the current standard outpu...
int executeCommand(const std::string &command, std::string *output=nullptr, const std::string &mode="r")
Execute Generic Shell Command.
int vsnprintf(char *buf, size_t bufSize, const char *format, va_list args) noexcept
An OS-independent version of vsnprintf (Notice the bufSize param, which may be ignored in some compil...
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
uint64_t _strtoull(const char *nptr, char **endptr, int base)
An OS-independent version of strtoull.
FILE * fopen(const char *fileName, const char *mode) noexcept
An OS-independent version of fopen.
std::string MRPT_getVersion()
Returns a string describing the MRPT version.
int64_t _strtoll(const char *nptr, char **endptr, int base)
An OS-independent version of strtoll.
bool launchProcess(const std::string &command)
Executes the given command (which may contain a program + arguments), and waits until it finishes...
#define MRPT_printf_format_check(_FMT_, _VARARGS_)
const std::string & getMRPTLicense()
Returns a const ref to a text with the same text that appears at the beginning of each MRPT file (use...
int _strcmp(const char *str1, const char *str2) noexcept
An OS-independent version of strcmp.
int sprintf(char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compiler...
void memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
An OS and compiler independent version of "memcpy".
int _strcmpi(const char *str1, const char *str2) noexcept
An OS-independent version of strcmpi.