src/internal/utils/kitringbuffer.c
int Kit_PeekRingBuffer(const Kit_RingBuffer *rb, char *data, int len) {
    len = (len > rb->len) ? rb->len : len;
    if(rb->len > 0) {
        _ReadRingBufferData(rb, data, len);
        return len;
    }
    return 0;
}
/**
  * Peeks into the given ringbuffer. Technically same as rb_read, but does not advance
  * the internal position pointer. In other words, you may peek as many times as you wish,
  * and will always get the same data.
  * @param rb Ringbuffer to peek into.
  * @param data Buffer to read into
  * @param len How much data do we need
  * @return Amount of data actually read
  */
Peeks into the given ringbuffer. Technically same as rb_read, but does not advance
the internal position pointer. In other words, you may peek as many times as you wish,
and will always get the same data.
@param rb Ringbuffer to peek into.
@param data Buffer to read into
@param len How much data do we need
@return Amount of data actually read
Peeks into the given ringbuffer . Technically same as rb_read but does not advance the internal position pointer . In other words you may peek as many times as you wish and will always get the same data . @param rb Ringbuffer to peek into . @param data Buffer to read into @param len How much data do we need @return Amount of data actually read
int Kit_PeekRingBuffer(const Kit_RingBuffer *rb, char *data, int len) {
    len = (len > rb->len) ? rb->len : len;
    if(rb->len > 0) {
        _ReadRingBufferData(rb, data, len);
        return len;
    }
    return 0;
}
int Kit_PeekRingBuffer ( const Kit_RingBuffer * rb , char * data , int len ) { len = ( len > rb -> len ) ? rb -> len : len ; if ( rb -> len > 0 ) { _ReadRingBufferData ( rb , data , len ) ; return len ; } return 0 ; }
Peeks into the given ringbuffer.
Peeks into the given ringbuffer .