MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / isBoundary

Method isBoundary

unittests/catch.hpp:5306–5314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5304 auto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; }
5305
5306 auto isBoundary( size_t at ) const -> bool {
5307 assert( at > 0 );
5308 assert( at <= line().size() );
5309
5310 return at == line().size() ||
5311 ( isWhitespace( line()[at] ) && !isWhitespace( line()[at-1] ) ) ||
5312 isBreakableBefore( line()[at] ) ||
5313 isBreakableAfter( line()[at-1] );
5314 }
5315
5316 void calcLength() {
5317 assert( m_stringIndex < m_column.m_strings.size() );

Callers

nothing calls this directly

Calls 4

isWhitespaceFunction · 0.85
isBreakableBeforeFunction · 0.85
isBreakableAfterFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected