method

delete_suffix!

v2_5_5 - Show latest stable - Class: String
delete_suffix!(p1)
public

Deletes trailing suffix from str, returning nil if no change was made.

"hello".delete_suffix!("llo") #=> "he"
"hello".delete_suffix!("hel") #=> nil