possiblyATemplate static method
Returns true
if s
can be a template code, has {{
and }}
.
Implementation
static bool possiblyATemplate(String s) {
if (s.length < _templateMinimalLength) return false;
var idx = s.indexOf('{{');
if (idx < 0) return false;
var idx2 = s.indexOf('}}', idx);
return idx2 > 0;
}