wrapSingleQuotes method

String wrapSingleQuotes({
  1. bool quoteEmpty = false,
})

Wraps the string in single quotes: 'string'.

If the string is empty, returns '' if quoteEmpty is true, otherwise returns an empty string.

Implementation

String wrapSingleQuotes({bool quoteEmpty = false}) => isEmpty
    ? quoteEmpty
          ? "''"
          : ''
    : "'$this'";