14#ifndef MRBC_SRC_C_STRING_H_
15#define MRBC_SRC_C_STRING_H_
32#if !defined(MRBC_STRING_SIZE_T)
33#define MRBC_STRING_SIZE_T uint16_t
37#define RSTRING_LEN(str) mrbc_string_size(&str)
38#define RSTRING_PTR(str) mrbc_string_cstr(&str)
100 if( res != 0 )
return res;
int mrbc_string_index(const mrbc_value *src, const mrbc_value *pattern, int offset)
void mrbc_string_delete(mrbc_value *str)
mrbc_value mrbc_string_dup(struct VM *vm, mrbc_value *s1)
void mrbc_string_clear(mrbc_value *str)
mrbc_value mrbc_string_add(struct VM *vm, const mrbc_value *s1, const mrbc_value *s2)
int mrbc_string_chomp(mrbc_value *src)
int mrbc_string_append_cbuf(mrbc_value *s1, const void *s2, int len2)
int mrbc_string_upcase(mrbc_value *str)
int mrbc_string_downcase(mrbc_value *str)
int mrbc_string_append(mrbc_value *s1, const mrbc_value *s2)
mrbc_value mrbc_string_new(struct VM *vm, const void *src, int len)
mrbc_value mrbc_string_new_alloc(struct VM *vm, void *buf, int len)
int mrbc_string_strip(mrbc_value *src, int mode)
struct RString mrbc_string
String object.
static char * mrbc_string_cstr(const mrbc_value *v)
static int mrbc_string_compare(const mrbc_value *v1, const mrbc_value *v2)
static mrbc_value mrbc_string_new_cstr(struct VM *vm, const char *src)
static int mrbc_string_append_cstr(mrbc_value *s1, const char *s2)
#define MRBC_STRING_SIZE_T
static int mrbc_string_size(const mrbc_value *str)
uint8_t * data
pointer to allocated buffer.
MRBC_STRING_SIZE_T size
string length.
mruby/c value definitions
struct RObject mrbc_value
Global configuration of mruby/c VM's.