buildConditionalReplacer method
Implementation
String buildConditionalReplacer(
String haystack,
String toReplace,
String replacement
){
final updatedMatch = '''
#ifdef USE_THREE_HEX_TILING
$replacement
#else
$toReplace
#endif
''';
return haystack.replaceAll(toReplace, updatedMatch);
}