wrapWith method
Returns this string wrapped with before prepended and after
appended, or null if the string is empty.
Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
String? wrapWith({String? before, String? after}) {
if (isEmpty) {
return null;
}
return '${before ?? ''}$this${after ?? ''}';
}