rbuf_len(3)

rbuf_len3

Get the len of an rbuf

Usage

#include <roy.h>

unsigned int rbuf_len (RBuf *buf);

Overview

This returns the length of the buffer held by buf. This length doesn't include the protective '\0' byte one past the appearent end of the buffer. See rbuf(3) for more details. This call acts much like strlen(3) in that it doesn't count the terminating '\0', but rbuf_len(3) is faster and can't overrun the buffer. It will also return the full length of the buffer, even if '\0' characters (possible with binary data) are included in the buffer.

Return value

Returns the length of the buffer held by buf.

Errors

Calls to rbuf_len(3) can never fail.

Macro

The rbuf_len(3) api is implemented using a macro.

Releases

2 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1

From libroy-dev 1.0.8-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.