From: James Edward Gray II Date: 2010-11-04T00:57:45+09:00 Subject: Re: UTF-8 aware chop for 1.8? On Nov 3, 2010, at 9:08 AM, Ammar Ali wrote: > Is there an easy way to chop (as in String#chop) a string that can > potentially contain UTF-8 in ruby 1.8? Or should I roll my own? Well, it should be this simple: str.gsub(/.\z/mu, "") James Edward Gray II