NAME

SPVM::Document::NativeAPI::StringBuffer - SPVM String Buffer Native APIs

SYNOPSYS

// String Buffer API
void* string_buffer_api = env->api->string_buffer;

// New string_buffer
void* string_buffer = string_buffer_api->new_string_buffer();

// Free string_buffer
string_buffer_api->free_string_buffer(string_buffer);

DESCRIPTION

SPVM String Buffer Native APIs are the public APIs for string buffers.

IDs of String Buffer Native APIs

String buffer native APIs have its IDs.

0 new_string_buffer_tmp
1 free_string_buffer
2 get_value
3 get_length

String Buffer Native APIs

new_string_buffer_tmp

void* (*new_string_buffer_tmp)();

Create a new temporary string buffer object.

free_string_buffer

void (*free_string_buffer)(void* string_buffer);

Free the string buffer object.

get_value

const char* (*get_value)(void* string_buffer);

Get the bytes of the string value of the string buffer object.

get_length

int32_t (*get_length)(void* string_buffer);

Get the length of the string value of the string buffer object.