wrap method

  1. @useResult
String wrap({
  1. String? before,
  2. String? after,
})

Returns this string wrapped with before prepended and after appended. Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
String wrap({String? before, String? after}) {
  final String prefix = before ?? '';
  final String suffix = after ?? '';

  return '$prefix$this$suffix';
}