Skip to contents

Creates a new empty stringfish vector

Usage

sf_vector(len)

Arguments

len

length of the new vector

Value

A new empty stringfish vector

Details

This is a backwards-compatible alias for `sf_vector_create(len)`. It creates a new stringfish vector, an alt-rep character vector backed by a C++ "std::vector" as the internal memory representation. The vector type is "sfstring", which is a simple C++ class containing owned string bytes and a single byte (uint8_t) representing the encoding.

Examples

x <- sf_vector(10)
sf_assign(x, 1, "hello world")
sf_assign(x, 2, "another string")