lib/command/string.js
function getbit(key, bitoffset, req) {
  var buf = this.getValueBuffer(key, req)
    , byte = bitoffset >> 3
    , bit = 7 - (bitoffset & 0x7)
    , bitval = 0;
  if(buf === undefined) return 0;
  if(byte < buf.length) {
    bitval = buf[byte] & (1 << bit);
  }
  return bitval ? 1 : 0;
}
function getbit(key, bitoffset, req) {
  var buf = this.getValueBuffer(key, req)
    , byte = bitoffset >> 3
    , bit = 7 - (bitoffset & 0x7)
    , bitval = 0;
  if(buf === undefined) return 0;
  if(byte < buf.length) {
    bitval = buf[byte] & (1 << bit);
  }
  return bitval ? 1 : 0;
}
function getbit ( key , bitoffset , req ) { var buf = this . getValueBuffer ( key , req ) , byte = bitoffset >> 3 , bit = 7 - ( bitoffset & 0x7 ) , bitval = 0 ; if ( buf === undefined ) return 0 ; if ( byte < buf . length ) { bitval = buf [ byte ] & ( 1 << bit ) ; } return bitval ? 1 : 0 ; }
Returns the bit value at offset in the string value stored at key.
Returns the bit value at offset in the string value stored at key .