MCPcopy Create free account
hub / github.com/RenderKit/oidn / splitStringRef

Function splitStringRef

external/catch.hpp:13863–13876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13861 }
13862
13863 std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {
13864 std::vector<StringRef> subStrings;
13865 std::size_t start = 0;
13866 for(std::size_t pos = 0; pos < str.size(); ++pos ) {
13867 if( str[pos] == delimiter ) {
13868 if( pos - start > 1 )
13869 subStrings.push_back( str.substr( start, pos-start ) );
13870 start = pos+1;
13871 }
13872 }
13873 if( start < str.size() )
13874 subStrings.push_back( str.substr( start, str.size()-start ) );
13875 return subStrings;
13876 }
13877
13878 pluralise::pluralise( std::size_t count, std::string const& label )
13879 : m_count( count ),

Callers 1

parseEnumsFunction · 0.85

Calls 2

sizeMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected