Serialize the sheet data
 @param [String] str the string this objects serializaton will be concacted to.
 @return [String]
185665
def to_xml_string(str = '')
      str << '<sheetData>'
      worksheet.rows.each_with_index do |row, index| 
        row.to_xml_string(index, str) 
      end
      str << '</sheetData>'
    end
917280
def to_xml_string(str='')
      return if empty?
      str << '<hyperlinks>'
      each { |hyperlink| hyperlink.to_xml_string(str) }
      str << '</hyperlinks>'
    end
652350
def to_xml_string(str="")
      serialized_tag('dataBar', str) do
        value_objects.to_xml_string(str)
        self.color.to_xml_string(str)
      end
    end
109453
def to_xml_string(str = '')
      str << '<tableStyles '
      serialized_attributes str, {:count => self.size }
      str << '>'
      each { |table_style| table_style.to_xml_string(str) }
      str << '</tableStyles>'
    end
709892
def to_xml_string(str = '')
      str << '<c:tx>'
      str << '<c:strRef>'
      str << ('<c:f>' << Axlsx::cell_range([@cell]) << '</c:f>')
      str << '<c:strCache>'
      str << '<c:ptCount val="1"/>'
      str << '<c:pt idx="0">'
      str << ('<c:v>' << @text << '</c:v>')
      str << '</c:pt>'
      str << '</c:strCache>'
      str << '</c:strRef>'
      str << '</c:tx>'
    end
115608
def to_xml_string(str = '')
      # macro attribute should be optional!
      str << '<xdr:graphicFrame>'
      str << '<xdr:nvGraphicFramePr>'
      str << ('<xdr:cNvPr id="' << @anchor.drawing.index.to_s << '" name="' << 'item_' << @anchor.drawing.index.to_s << '"/>')
      str << '<xdr:cNvGraphicFramePr/>'
      str << '</xdr:nvGraphicFramePr>'
      str << '<xdr:xfrm>'
      str << '<a:off x="0" y="0"/>'
      str << '<a:ext cx="0" cy="0"/>'
      str << '</xdr:xfrm>'
      str << '<a:graphic>'
      str << ('<a:graphicData uri="' << XML_NS_C << '">')
      str << ('<c:chart xmlns:c="' << XML_NS_C << '" xmlns:r="' << XML_NS_R << '" r:id="' << rId << '"/>')
      str << '</a:graphicData>'
      str << '</a:graphic>'
      str << '</xdr:graphicFrame>'
    end
1145357
def to_xml_string(str = '')
      str << '<xdr:oneCellAnchor>'
      str << '<xdr:from>'
      from.to_xml_string(str)
      str << '</xdr:from>'
      str << ('<xdr:ext cx="' << ext[:cx].to_s << '" cy="' << ext[:cy].to_s << '"/>')
      @object.to_xml_string(str)
      str << '<xdr:clientData/>'
      str << '</xdr:oneCellAnchor>'
    end
1041821
def to_xml_string(str = '')
      str << '<c:scaling>'
      str << ('<c:logBase val="' << @logBase.to_s << '"/>') unless @logBase.nil?
      str << ('<c:orientation val="' << @orientation.to_s << '"/>') unless @orientation.nil?
      str << ('<c:min val="' << @min.to_s << '"/>') unless @min.nil?
      str << ('<c:max val="' << @max.to_s << '"/>') unless @max.nil?
      str << '</c:scaling>'
    end
807487
def to_xml_string(str = '')
      str << '<gradientFill '
      serialized_attributes str
      str << '>'
      @stop.each { |s| s.to_xml_string(str) }
      str << '</gradientFill>'
    end
966525
function decode(str) {
  const [hrp, data] = deserialize(str);

  if (data.length === 0 || data.length > 65)
    throw new Error('Invalid bech32 data length.');

  if (data[0] > 16)
    throw new Error('Invalid bech32 version.');

  const version = data[0];
  const output = data;
  const hash = convert(data, output, 5, 8, -1, 1);

  if (hash.length < 2 || hash.length > 40)
    throw new Error('Invalid bech32 data length.');

  return new AddrResult(hrp, version, hash);
}
1218151
def to_xml_string(str = '')
      str << '<border '
      serialized_attributes str
      str << '>'
      # enforces order
      [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k|
        @prs.select { |pr| pr.name == k }.each do |part|
          part.to_xml_string(str)
        end
      end
      str << '</border>'
    end
130340
def write(str)
      s = str.to_s
      @length += Rack::Utils.bytesize(s)
      @writer.call s

      header["Content-Length"] = @length.to_s
      str
    end
997212
def to_xml_string(str = '')
      str << ('<styleSheet xmlns="' << XML_NS << '">')
      [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key|
        self.instance_values[key.to_s].to_xml_string(str) unless self.instance_values[key.to_s].nil?
      end
      str << '</styleSheet>'
    end
598192
def to_xml_string(str = '')
      str << '<xf '
      serialized_attributes str
      str << '>'
      alignment.to_xml_string(str) if self.alignment
      protection.to_xml_string(str) if self.protection
      str << '</xf>'
    end
483755
def serialize_args(args)
      return {} if args.nil?

      args.each do |key, value|
        case value
        when DateTime, Time
          args[key] = value.strftime('%m/%d/%Y %H:%M:%S')
        when Date
          args[key] = value.strftime('%m/%d/%Y')
        else
          # Especially for range operator (...), we want to output as String
          args[key] = value.to_s
        end
      end

      args
    end
621464
def to_xml_string(r_index, str = '')
      serialized_tag('row', str, :r => r_index + 1) do
        tmp = '' # time / memory tradeoff, lots of calls to rubyzip costs more
                 # time..
        each_with_index { |cell, c_index| cell.to_xml_string(r_index, c_index, tmp) }
        str << tmp
      end
    end
1089864
def load_str(str=nil,format=nil)
      str = @data if str.nil?
      format = @format if format.nil?

      @value = {}
      case format
      when List::FORMAT_BINARY, List::FORMAT_XML, List::FORMAT_PLAIN then
        prsr = @@parsers[format-1].new
        @value = prsr.load({:data => str})

      when List::FORMAT_AUTO then # what we now do is ugly, but neccessary to recognize the file format
        filetype = str[0..5]
        version = str[6..7]

        prsr = nil

        if filetype == "bplist" then
          raise CFFormatError.new("Wrong file version #{version}") unless version == "00"
          prsr = Binary.new
          @format = List::FORMAT_BINARY
        else
          if str =~ /^<(\?xml|!DOCTYPE|plist)/
            prsr = CFPropertyList.xml_parser_interface.new
            @format = List::FORMAT_XML
          else
            prsr = PlainParser.new
            @format = List::FORMAT_PLAIN
          end
        end

        @value = prsr.load({:data => str})
      end
    end