22 bool caseSensitive =
true,
int* outLeftRightAddition =
nullptr );
29[[nodiscard]]
MRMESH_API std::vector<std::string>
split(
const std::string&
string,
const std::string& delimiter );
34bool split( std::string_view str, std::string_view sep, F&& func )
36 std::size_t index = 0;
40 std::size_t newIndex = str.find( sep, index );
41 if ( func( str.substr( index, newIndex - index ) ) )
43 if ( newIndex == std::string_view::npos )
45 index = newIndex + sep.size();
51[[nodiscard]]
MRMESH_API std::string
replace( std::string target, std::string_view from, std::string_view to );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
MRMESH_API size_t findSubstringCaseInsensitive(const std::string &string, const std::string &substring)
MRMESH_API std::vector< std::string > split(const std::string &string, const std::string &delimiter)
MRMESH_API int calcDamerauLevenshteinDistance(const std::string &stringA, const std::string &stringB, bool caseSensitive=true, int *outLeftRightAddition=nullptr)
Definition MRCameraOrientationPlugin.h:8
MRMESH_API std::string replace(std::string target, std::string_view from, std::string_view to)
Returns.
MRMESH_API void replaceInplace(std::string &target, std::string_view from, std::string_view to)
Replaces.
MRMESH_API std::string_view trimRight(std::string_view str)
Removes all whitespace character (detected by std::isspace) at the end of string view.