Sha256: 147d96c97b54721ffcc2ca209af9f98b21f1c1fac9a287eaf720654ad9685744

Contents?: true

Size: 524 Bytes

Versions: 12

Compression:

Stored size: 524 Bytes

Contents

require_relative '../display_width' unless defined? Unicode::DisplayWidth

class String
  def display_width(ambiguous = 1, overwrite = {})
    Unicode::DisplayWidth.of(self, ambiguous, overwrite)
  end

  def display_size(*args)
    warn "Deprecation warning: Please use `String#display_width` instead of `String#display_size`"
    display_width(*args)
  end

  def display_length(*args)
    warn "Deprecation warning: Please use `String#display_width` instead of `String#display_length`"
    display_width(*args)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
brakeman-3.6.1 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/lib/unicode/display_width/string_ext.rb
brakeman-3.6.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/lib/unicode/display_width/string_ext.rb
brakeman-3.5.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.3/lib/unicode/display_width/string_ext.rb
unicode-display_width-1.1.3 lib/unicode/display_width/string_ext.rb
unicode-display_width-1.1.2 lib/unicode/display_width/string_ext.rb
brakeman-3.4.1 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.1/lib/unicode/display_width/string_ext.rb
brakeman-3.4.0 bundle/ruby/2.3.0/gems/unicode-display_width-1.1.1/lib/unicode/display_width/string_ext.rb
unicode-display_width-1.1.1 lib/unicode/display_width/string_ext.rb
unicode-display_width-1.1.0 lib/unicode/display_width/string_ext.rb
unicode-display_width-1.0.5 lib/unicode/display_width/string_ext.rb
unicode-display_width-1.0.4 lib/unicode/display_width/string_ext.rb
unicode-display_width-1.0.3 lib/unicode/display_width/string_ext.rb