#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
Go to the source code of this file.
|
| MRC_API MR_uint64_t | MR_findSubstringCaseInsensitive (const char *string, const char *string_end, const char *substring, const char *substring_end) |
| |
| MRC_API int | MR_calcDamerauLevenshteinDistance (const char *stringA, const char *stringA_end, const char *stringB, const char *stringB_end, const bool *caseSensitive, int *outLeftRightAddition) |
| |
| MRC_API MR_std_vector_std_string * | MR_split (const char *string, const char *string_end, const char *delimiter, const char *delimiter_end) |
| |
| MRC_API MR_std_string * | MR_replace (const char *target, const char *target_end, const char *from, const char *from_end, const char *to, const char *to_end) |
| |
| MRC_API void | MR_replaceInplace (MR_std_string *target, const char *from, const char *from_end, const char *to, const char *to_end) |
| |
| MRC_API MR_std_string_view * | MR_trim (const char *str, const char *str_end) |
| |
| MRC_API MR_std_string_view * | MR_trimLeft (const char *str, const char *str_end) |
| |
| MRC_API MR_std_string_view * | MR_trimRight (const char *str, const char *str_end) |
| |
| MRC_API bool | MR_hasFormatPlaceholders (const char *str, const char *str_end) |
| |
◆ MR_std_string
◆ MR_std_string_view
◆ MR_std_vector_std_string
◆ MR_calcDamerauLevenshteinDistance()
| MRC_API int MR_calcDamerauLevenshteinDistance |
( |
const char * | stringA, |
|
|
const char * | stringA_end, |
|
|
const char * | stringB, |
|
|
const char * | stringB_end, |
|
|
const bool * | caseSensitive, |
|
|
int * | outLeftRightAddition ) |
Calculates Damerau-Levenshtein distance between to strings
- Parameters
-
| outLeftRightAddition | if provided return amount of insertions to the left and to the right Generated from function MR::calcDamerauLevenshteinDistance. Parameter stringA can not be null. If stringA_end is null, then stringA is assumed to be null-terminated. Parameter stringB can not be null. If stringB_end is null, then stringB is assumed to be null-terminated. Parameter caseSensitive has a default argument: true, pass a null pointer to use it. Parameter outLeftRightAddition defaults to a null pointer in C++. |
◆ MR_findSubstringCaseInsensitive()
| MRC_API MR_uint64_t MR_findSubstringCaseInsensitive |
( |
const char * | string, |
|
|
const char * | string_end, |
|
|
const char * | substring, |
|
|
const char * | substring_end ) |
Finds the substring in the string.
- Returns
- position, npos if not found Generated from function
MR::findSubstringCaseInsensitive. Parameter string can not be null. If string_end is null, then string is assumed to be null-terminated. Parameter substring can not be null. If substring_end is null, then substring is assumed to be null-terminated.
◆ MR_hasFormatPlaceholders()
| MRC_API bool MR_hasFormatPlaceholders |
( |
const char * | str, |
|
|
const char * | str_end ) |
Returns true if str has at least one {...} formatting placeholder. Generated from function MR::hasFormatPlaceholders. Parameter str can not be null. If str_end is null, then str is assumed to be null-terminated.
◆ MR_replace()
| MRC_API MR_std_string * MR_replace |
( |
const char * | target, |
|
|
const char * | target_end, |
|
|
const char * | from, |
|
|
const char * | from_end, |
|
|
const char * | to, |
|
|
const char * | to_end ) |
Returns
- Parameters
-
| target | with all |
| from | replaced with |
| to,zero | or more times. Generated from function MR::replace. Parameter target can not be null. If target_end is null, then target is assumed to be null-terminated. Parameter from can not be null. If from_end is null, then from is assumed to be null-terminated. Parameter to can not be null. If to_end is null, then to 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_replaceInplace()
| MRC_API void MR_replaceInplace |
( |
MR_std_string * | target, |
|
|
const char * | from, |
|
|
const char * | from_end, |
|
|
const char * | to, |
|
|
const char * | to_end ) |
Replaces
- Parameters
-
| from | with |
| to | in |
| target | (in-place), zero or more times. Generated from function MR::replaceInplace. Parameter target can not be null. It is a single object. Parameter from can not be null. If from_end is null, then from is assumed to be null-terminated. Parameter to can not be null. If to_end is null, then to is assumed to be null-terminated. |
◆ MR_split()
Splits given string by delimiter.
- Returns
- vector of split strings Generated from function
MR::split. Parameter string can not be null. If string_end is null, then string is assumed to be null-terminated. Parameter delimiter can not be null. If delimiter_end is null, then delimiter is assumed to be null-terminated. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_std_string_Destroy() to free it when you're done using it.
◆ MR_trim()
Removes all whitespace character (detected by std::isspace) at the beginning and the end of string view Generated from function MR::trim. 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_view_Destroy() to free it when you're done using it.
◆ MR_trimLeft()
Removes all whitespace character (detected by std::isspace) at the beginning of string view Generated from function MR::trimLeft. 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_view_Destroy() to free it when you're done using it.
◆ MR_trimRight()
Removes all whitespace character (detected by std::isspace) at the end of string view Generated from function MR::trimRight. 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_view_Destroy() to free it when you're done using it.