MeshLib C Docs
Loading...
Searching...
No Matches
MRStringConvert.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stdbool.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
13typedef struct MR_std_vector_std_filesystem_path MR_std_vector_std_filesystem_path; // Defined in `#include <MRCMisc/std_vector_std_filesystem_path.h>`.
14
15
21MRC_API MR_std_string *MR_systemToUtf8(const char *system, const char *system_end);
22
29MRC_API MR_std_string *MR_utf8ToSystem(const char *utf8, const char *utf8_end);
30
34MRC_API MR_std_string *MR_utf8string(const char *path, const char *path_end);
35
41
50
55
60MRC_API bool MR_hasProhibitedChars(const char *line, const char *line_end);
61
68MRC_API MR_std_string *MR_replaceProhibitedChars(const char *line, const char *line_end, const char *replacement);
69
78
81MRC_API double MR_roundToPrecision_double(double v, int precision);
82
85MRC_API float MR_roundToPrecision_float(float v, int precision);
86
87// Returns message showed when loading is canceled
91MRC_API MR_std_string *MR_getCancelMessage(const char *path, const char *path_end);
92
98MRC_API MR_std_string *MR_toLower(const char *str, const char *str_end);
99
100#ifdef __cplusplus
101} // extern "C"
102#endif
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_std_vector_std_filesystem_path MR_std_vector_std_filesystem_path
Definition MRSceneLoad.h:20
MRC_API MR_std_string * MR_toLower(const char *str, const char *str_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 bool MR_hasProhibitedChars(const char *line, const char *line_end)
MRC_API double MR_roundToPrecision_double(double v, int precision)
MRC_API MR_std_string * MR_systemToUtf8(const char *system, const char *system_end)
MRC_API MR_std_string * MR_commonFilesName(const MR_std_vector_std_filesystem_path *files)
MRC_API float MR_roundToPrecision_float(float v, int precision)
MRC_API MR_std_string * MR_utf8ToSystem(const char *utf8, const char *utf8_end)
MRC_API MR_std_string * MR_getCancelMessage(const char *path, const char *path_end)
MRC_API MR_std_string * MR_bytesString(MR_uint64_t size)
MRC_API bool MR_isProhibitedChar(char c)
MRC_API MR_std_string * MR_replaceProhibitedChars(const char *line, const char *line_end, const char *replacement)
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11
size_t size() const