Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

String#delete_suffix!

delete_suffix!(suffix) → self or nil

Like String#delete_suffix, except that self is modified in place. Returns self if the suffix is removed, nil otherwise.