class Unicode::DisplayWidth

def self.width_custom(string, overwrite)

Returns width of custom overwrites and remaining string
def self.width_custom(string, overwrite)
  width = 0
  string = string.each_codepoint.select{ |codepoint|
    if overwrite[codepoint]
      width += overwrite[codepoint]
      nil
    else
      codepoint
    end
  }.pack("U*")
  [width, string]
end