createOptionsString static method
Implementation
static String createOptionsString(
{String? options,
bool? multiLine,
bool? caseInsensitive,
bool? dotAll,
bool? extended}) {
if (options != null && options.isNotEmpty) {
return options;
}
var buffer = StringBuffer();
if (caseInsensitive ?? false) {
buffer.write('i');
}
if (multiLine ?? false) {
buffer.write('m');
}
if (dotAll ?? false) {
buffer.write('s');
}
if (extended ?? false) {
buffer.write('x');
}
return '$buffer';
}