Version: v0.8.1 - Beta.  We welcome contributors & feedback.

String.removeRight

removeRight($suffix) -> string

Description

Remove $suffix from the end of the string if it exists.

'100%'.removeRight('%')
//= '100'

'100'.removeRight('%')
//= '100'

See Also