ensureSuffix method

  1. @useResult
String ensureSuffix(
  1. String suffix
)

Returns this string with suffix appended if not already present. Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
String ensureSuffix(String suffix) => endsWith(suffix) ? this : this + suffix;