---
name: "rbuf_float"
section: "3"
platform: "linux"
package: "libroy-dev"
version: "1.0.8-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://carta.tech/man/rbuf_str"
---

# rbuf\_float(3)

get the buffer from an rbuf rbuf\_long - return float value of rbuf contents. rbuf\_float - return float value of rbuf contents.

Part of [rbuf\_str(3)](/man/rbuf_str/3.md).

## NAME

rbuf\_str - get the buffer from an rbuf

rbuf\_long - return float value of rbuf contents.

rbuf\_float - return float value of rbuf contents.

## SYNOPSIS

\#include \<roy.h\>

char \* rbuf\_str (RBuf \**buf*);

long rbuf\_long (RBuf \**buf*);

float rbuf\_float (RBuf \**buf*);

## DESCRIPTION

The rbuf structure is meant to be fully opaque to the programmer, and any access of the rbuf's buffer should be done using these calls. The return value of [*rbuf\_str*(3)](/man/rbuf_str/3.md) does not always stay constant with some rbuf api calls, so programmers shouldn't keep long term references to the buffer.

[*rbuf\_long*(3)](/man/rbuf_long/3.md) returns the integer value of *buf*.  This is a macro wrapper around [*atol*(3)](/man/atol/3.md).

[*rbuf\_float*(3)](/man/rbuf_float/3.md) returns the float value of *buf*.  This is a macro wrapper around [*atof*(3)](/man/atof/3.md).

## RETURN VALUE

[*rbuf\_str*(3)](/man/rbuf_str/3.md) returns the buffer that the rbuf points to.

[*rbuf\_long*(3)](/man/rbuf_long/3.md) and [*rbuf\_float*(3)](/man/rbuf_float/3.md) return a long and float respectively.

## ERRORS

These functions never err.

## MACRO

These apis are all implemented using macros.

## SEE ALSO

[*rbuf*(3)](/man/rbuf/3.md), [*rbuf\_append*(3)](/man/rbuf_append/3.md),  [*rbuf\_append\_char*(3)](/man/rbuf_append_char/3.md), [*rbuf\_append\_data*(3)](/man/rbuf_append_data/3.md),  [*rbuf\_append\_rbuf*(3)](/man/rbuf_append_rbuf/3.md), [*rbuf\_append\_sprintf*(3)](/man/rbuf_append_sprintf/3.md),  [*rbuf\_append\_str*(3)](/man/rbuf_append_str/3.md), [*rbuf\_append\_vsprintf*(3)](/man/rbuf_append_vsprintf/3.md),  [*rbuf\_auto*(3)](/man/rbuf_auto/3.md), [*rbuf\_down*(3)](/man/rbuf_down/3.md),  [*rbuf\_empty*(3)](/man/rbuf_empty/3.md), [*rbuf\_equal*(3)](/man/rbuf_equal/3.md),  [*rbuf\_equal\_data*(3)](/man/rbuf_equal_data/3.md), [*rbuf\_equal\_rbuf*(3)](/man/rbuf_equal_rbuf/3.md),  [*rbuf\_equal\_rbuf\_len*(3)](/man/rbuf_equal_rbuf_len/3.md), [*rbuf\_equal\_rbufcase*(3)](/man/rbuf_equal_rbufcase/3.md),  [*rbuf\_equal\_str*(3)](/man/rbuf_equal_str/3.md), [*rbuf\_equal\_str\_len*(3)](/man/rbuf_equal_str_len/3.md),  [*rbuf\_equal\_strcase*(3)](/man/rbuf_equal_strcase/3.md), [*rbuf\_erase*(3)](/man/rbuf_erase/3.md),  [*rbuf\_float*(3)](/man/rbuf_float/3.md), [*rbuf\_free*(3)](/man/rbuf_free/3.md),  [*rbuf\_hash*(3)](/man/rbuf_hash/3.md), [*rbuf\_insert*(3)](/man/rbuf_insert/3.md),  [*rbuf\_last*(3)](/man/rbuf_last/3.md), [*rbuf\_len*(3)](/man/rbuf_len/3.md),  [*rbuf\_long*(3)](/man/rbuf_long/3.md), [*rbuf\_new*(3)](/man/rbuf_new/3.md),  [*rbuf\_new\_with\_sprintf*(3)](/man/rbuf_new_with_sprintf/3.md), [*rbuf\_own*(3)](/man/rbuf_own/3.md),  [*rbuf\_prepend*(3)](/man/rbuf_prepend/3.md), [*rbuf\_prepend\_char*(3)](/man/rbuf_prepend_char/3.md),  [*rbuf\_prepend\_data*(3)](/man/rbuf_prepend_data/3.md), [*rbuf\_prepend\_rbuf*(3)](/man/rbuf_prepend_rbuf/3.md),  [*rbuf\_prepend\_str*(3)](/man/rbuf_prepend_str/3.md), [*rbuf\_rdonly*(3)](/man/rbuf_rdonly/3.md),  [*rbuf\_set\_to*(3)](/man/rbuf_set_to/3.md), [*rbuf\_split*(3)](/man/rbuf_split/3.md),  [*rbuf\_sprintf*(3)](/man/rbuf_sprintf/3.md), [*rbuf\_truncate*(3)](/man/rbuf_truncate/3.md),  [*rbuf\_up*(3)](/man/rbuf_up/3.md), [*roy*(3)](/man/roy/3.md)
