wrapDoubleQuotes method
Returns this string wrapped in double quotes: "string".
If the string is empty, returns "" if quoteEmpty is true,
otherwise returns an empty string.
Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
String wrapDoubleQuotes({bool quoteEmpty = false}) {
if (isEmpty) {
return quoteEmpty ? '""' : '';
}
return '"$this"';
}