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

# rarray\_len(3)

get/set array length.

## NAME

rarray\_len, rarray\_set\_len - get/set array length.

## SYNOPSIS

\#include \<roy.h\>

unsigned int rarray\_len (RArray \**array*);

void rarray\_set\_len (RArray \**array*, unsigned int *len*);

## DESCRIPTION

[*rarray\_len*(3)](/rarray_len/3.md) returns the number of entries in the array *array*.

[*rarray\_set\_len*(3)](/rarray_set_len/3.md) sets the number of entries in the array to *len*.  If len is greater than the current number, the current entry is advanced to that position, but none of the entries over which it had to skip to get there are changed.  If more blocks are required (see [*rarray\_new*(3)](/rarray_new/3.md)), then they are created as needed.  If the rarray is to be shrunken, the current entry pointer is merely moved back.

## RETURN VALUE

[*rarray\_len*(3)](/rarray_len/3.md) returns the number of entries in the array.

[*rarray\_set\_len*(3)](/rarray_set_len/3.md) returns no value.

## ERRORS

These calls produce no errors.

## SEE ALSO

[*rarray*(3)](/rarray/3.md), [*rarray\_append*(3)](/rarray_append/3.md),  [*rarray\_free*(3)](/rarray_free/3.md), [*rarray\_last*(3)](/rarray_last/3.md),  [*rarray\_new*(3)](/rarray_new/3.md), [*rarray\_nth*(3)](/rarray_nth/3.md),  [*rarray\_peek*(3)](/rarray_peek/3.md), [*rarray\_pop*(3)](/rarray_pop/3.md),  [*rarray\_push*(3)](/rarray_push/3.md), [*rarray\_set\_len*(3)](/rarray_set_len/3.md),  [*roy*(3)](/roy/3.md)
