MCPcopy Create free account
hub / github.com/SpartanJ/eepp / subst

Method subst

src/eepp/system/patternmatcher.cpp:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158bool PatternMatcher::Match::subst( std::string& res ) {
159 if ( !matches() ) {
160 res.append( mString );
161 return false;
162 }
163 int start = 0, end = 0;
164 mState->range( 0, start, end );
165 if ( start == 0 )
166 return true;
167 res.append( mString, start );
168 return true;
169}
170
171PatternMatcher::Match PatternMatcher::gmatch( const char* s ) & {
172 return PatternMatcher::Match( *this, s, false );

Callers 1

gsubMethod · 0.80

Calls 2

rangeMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected