#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
Go to the source code of this file.
|
| MRC_API MR_std_string * | MR_systemToUtf8 (const char *system, const char *system_end) |
| |
| MRC_API MR_std_string * | MR_utf8ToSystem (const char *utf8, const char *utf8_end) |
| |
| MRC_API MR_std_string * | MR_utf8string (const char *path, const char *path_end) |
| |
| MRC_API MR_std_string * | MR_utf8substr (const char *s, MR_uint64_t pos, MR_uint64_t count) |
| |
| MRC_API MR_std_string * | MR_bytesString (MR_uint64_t size) |
| |
| MRC_API bool | MR_isProhibitedChar (char c) |
| |
| MRC_API bool | MR_hasProhibitedChars (const char *line, const char *line_end) |
| |
| MRC_API MR_std_string * | MR_replaceProhibitedChars (const char *line, const char *line_end, const char *replacement) |
| |
| MRC_API MR_std_string * | MR_commonFilesName (const MR_std_vector_std_filesystem_path *files) |
| |
| MRC_API double | MR_roundToPrecision_double (double v, int precision) |
| |
| MRC_API float | MR_roundToPrecision_float (float v, int precision) |
| |
| MRC_API MR_std_string * | MR_getCancelMessage (const char *path, const char *path_end) |
| |
| MRC_API MR_std_string * | MR_toLower (const char *str, const char *str_end) |
| |
◆ MR_std_string
◆ MR_std_vector_std_filesystem_path
◆ MR_bytesString()
converts given size in string: [0,1024) -> nnn bytes [1024,1024*1024) -> nnn.nn Kb [1024*1024,1024*1024*1024) -> nnn.nn Mb ... Generated from function MR::bytesString. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_commonFilesName()
in case of empty vector, returns "Empty" in case of single input file.ext, returns ".EXT" in case of multiple files with same extension, returns ".EXTs" otherwise returns "Files" Generated from function MR::commonFilesName. Parameter files can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_getCancelMessage()
Generated from function MR::getCancelMessage. Parameter path is a UTF-8 encoded filesystem path. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_hasProhibitedChars()
| MRC_API bool MR_hasProhibitedChars |
( |
const char * | line, |
|
|
const char * | line_end ) |
returns true if line contains at least one character (c) for which isProhibitedChar(c)==true Generated from function MR::hasProhibitedChars. Parameter line can not be null. If line_end is null, then line is assumed to be null-terminated.
◆ MR_isProhibitedChar()
| MRC_API bool MR_isProhibitedChar |
( |
char | c | ) |
|
◆ MR_replaceProhibitedChars()
| MRC_API MR_std_string * MR_replaceProhibitedChars |
( |
const char * | line, |
|
|
const char * | line_end, |
|
|
const char * | replacement ) |
replace all characters (c), where isProhibitedChar(c)==true, with replacement char Generated from function MR::replaceProhibitedChars. Parameter line can not be null. If line_end is null, then line is assumed to be null-terminated. Parameter replacement has a default argument: ‘’_', pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must callMR_std_string_Destroy()` to free it when you're done using it.
◆ MR_roundToPrecision_double()
| MRC_API double MR_roundToPrecision_double |
( |
double | v, |
|
|
int | precision ) |
returns given value rounded to given number of decimal digits Generated from function MR::roundToPrecision.
◆ MR_roundToPrecision_float()
| MRC_API float MR_roundToPrecision_float |
( |
float | v, |
|
|
int | precision ) |
returns given value rounded to given number of decimal digits Generated from function MR::roundToPrecision.
◆ MR_systemToUtf8()
converts system encoded string to UTF8-encoded string Generated from function MR::systemToUtf8. Parameter system can not be null. If system_end is null, then system is assumed to be null-terminated. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_toLower()
return a copy of the string with all alphabetic ASCII characters replaced with upper-case variants Generated from function MR::toLower. Parameter str can not be null. If str_end is null, then str is assumed to be null-terminated. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_utf8string()
Generated from function MR::utf8string. Parameter path is a UTF-8 encoded filesystem path. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_utf8substr()
given on input a valid utf8-encoded string, returns its substring starting at pos unicode symbol, and containing at most count unicode symbols (but res.size() can be more than count since a unicode symbol can be represented by more than 1 byte) Generated from function MR::utf8substr. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.
◆ MR_utf8ToSystem()
converts UTF8-encoded string to system encoded string, returns empty string if such conversion cannot be made Generated from function MR::utf8ToSystem. Parameter utf8 can not be null. If utf8_end is null, then utf8 is assumed to be null-terminated. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.