method

delete_prefix!

ruby latest stable - Class: String
delete_prefix!(p1)
public

Deletes leading prefix from str, returning nil if no change was made.

"hello".delete_prefix!("hel") #=> "lo"
"hello".delete_prefix!("llo") #=> nil