buildString function
Builds new string by populating newly created StringBuffer using provided builderAction
and then converting it to String.
Implementation
String buildString(void Function(StringBuffer sb) builderAction) {
final buffer = StringBuffer();
builderAction(buffer);
return buffer.toString();
}