withApostrophe method

String withApostrophe()

Implementation

String withApostrophe() {
  final endsWithS = this[length - 1] == 's';
  final apostrophe = endsWithS ? '\'' : '\'s';
  return this + apostrophe;
}