]> git.cworth.org Git - sup/blobdiff - lib/sup/util.rb
Merge commit 'origin/utf8-fixes'
[sup] / lib / sup / util.rb
index c26b4dbe9a3fe5207d34be9067394d571c36c979..b479908e1263dc1384537c72c2d0c9fcaf4c9146 100644 (file)
@@ -172,6 +172,8 @@ class Object
 end
 
 class String
+  def display_length; scan(/./u).size end
+
   def camel_to_hyphy
     self.gsub(/([a-z])([A-Z0-9])/, '\1-\2').downcase
   end