#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
|
MRC_API MR_uint64_t | MR_findSubstringCaseInsensitive (const MR_std_string *string, const MR_std_string *substring) |
|
MRC_API int32_t | MR_calcDamerauLevenshteinDistance (const MR_std_string *stringA, const MR_std_string *stringB, const bool *caseSensitive, int32_t *outLeftRightAddition) |
|
MRC_API MR_std_vector_std_string * | MR_split (const MR_std_string *string, const MR_std_string *delimiter) |
|
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) |
|
◆ MR_std_string
◆ MR_std_string_view
◆ MR_std_vector_std_string
◆ MR_calcDamerauLevenshteinDistance()
MRC_API int32_t MR_calcDamerauLevenshteinDistance |
( |
const MR_std_string * | stringA, |
|
|
const MR_std_string * | stringB, |
|
|
const bool * | caseSensitive, |
|
|
int32_t * | 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. It is a single object. Parameter stringB can not be null. It is a single object. 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()
Finds the substring in the string.
- Returns
- position, npos if not found Generated from function
MR::findSubstringCaseInsensitive
. Parameter string
can not be null. It is a single object. Parameter substring
can not be null. It is a single object.
◆ 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. It is a single object. Parameter delimiter
can not be null. It is a single object. 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.