wrap method

String wrap(
  1. String prefix, [
  2. String? suffix
])

Wraps the string with prefix and suffix (defaults to prefix).

'world'.wrap('**');        // '**world**'
'note'.wrap('<', '>');     // '<note>'

Implementation

String wrap(String prefix, [String? suffix]) =>
    '$prefix$this${suffix ?? prefix}';