Project

General

Profile

Actions

Feature #10574

open

Add String#lchomp and String.lchomp!

Added by javawizard (Alex Boyd) over 9 years ago. Updated 13 days ago.

Status:
Assigned
Target version:
-
[ruby-core:66727]

Description

With the expected behavior, i.e.

irb(main):013:0> 'foobar'.lchomp('foo')
=> "bar"
irb(main):014:0> 'foobar'.lchomp('baz')
=> "foobar"

A quick google search will turn up plenty of practical uses for this, as well as lots of libraries that patch String themselves to add this.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0