MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / split

Function split

source/MRMesh/MRString.cpp:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158std::vector<std::string> split( const std::string& string, const std::string& delimiter )
159{
160 std::vector<std::string> res;
161 size_t pos = 0;
162 for ( ;;)
163 {
164 auto delimPos = string.find( delimiter, pos );
165 res.push_back( string.substr( pos, delimPos - pos ) );
166 if ( delimPos == std::string::npos )
167 break;
168 pos = delimPos + delimiter.size();
169 }
170
171 return res;
172}
173
174std::string replace( std::string target, std::string_view from, std::string_view to )
175{

Callers 1

replaceFunction · 0.70

Calls 3

push_backMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected