method
delete_suffix
ruby latest stable - Class:
String
delete_suffix(p1)public
Returns a copy of str with trailing suffix deleted.
"hello".delete_suffix("llo") #=> "he" "hello".delete_suffix("hel") #=> "hello"
delete_suffix(p1)Returns a copy of str with trailing suffix deleted.
"hello".delete_suffix("llo") #=> "he" "hello".delete_suffix("hel") #=> "hello"