Sha256: 6a2ee318e7810ef2eacf3517d963338da857b244a9b8ae107b81f4070e241f4e

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require 'stringio'

module Wiris
  class StringBuf
    @sb

    def sb
      @sb
    end
    
    def initialize()
      @sb = StringIO.new('',"a+") # Append mode 
    end

    def add(o)
      @sb << o
    end

    def addChar(c)
      @sb << c.chr
    end
    
    # public void addSub(String s, int pos, int len){
    #   sb.append(s, pos, len+pos);
    # }
    
    def toString()
      return @sb.string
    end

    def to_s()
      return @sb.string
    end
    # /**
    #  * Not for haxe! Only for C#
    #  * **/
    # public int length(){
    #   return sb.length();
    # }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wirispluginengine-3.62.0.1322 lib/src-generic/StringBuf.rb