method

delete_prefix!

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - 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
Show source
Register or log in to add new notes.