In: |
plruby.rb
|
Parent: | Object |
The class PLRuby::BitString implement the PostgreSQL type bit and bit varying
create a new BitString object with nbits bits
init can be a Fixnum or a String
For a String the first character can be ‘x’, ‘X’ for and hexadecimal representation, or ‘b’, ‘B’ for a binary representation. The default is a binary representation
comparison function for 2 BitString objects
All bits are considered and additional zero bits may make one string smaller/larger than the other, even if their zero-padded values would be the same.
Element reference with the same syntax that for a String object
Return a BitString or a Fixnum 0, 1
bitstring[fixnum] bitstring[fixnum, fixnum] bitstring[range] bitstring[regexp] bitstring[regexp, fixnum] bitstring[string] bitstring[other_bitstring]
Element assignment with the same syntax that for a String object
bitstring[fixnum] = fixnum bitstring[fixnum] = string_or_bitstring bitstring[fixnum, fixnum] = string_or_bitstring bitstring[range] = string_or_bitstring bitstring[regexp] = string_or_bitstring bitstring[regexp, fixnum] = string_or_bitstring bitstring[other_str] = string_or_bitstring