Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 340 Bytes

delete_prefix.rdoc

File metadata and controls

8 lines (6 loc) · 340 Bytes

Returns a copy of self with leading substring prefix removed:

'hello'.delete_prefix('hel')      # => "lo"
'hello'.delete_prefix('llo')      # => "hello"
'тест'.delete_prefix('те')        # => "ст"
'こんにちは'.delete_prefix('こん')  # => "にちは"

Related: String#delete_prefix!, String#delete_suffix.