offbrand
A collection of generic, reference counted datastructures in C for C
 All Classes Files Functions Variables Typedefs Macros Groups
obstring.h
Go to the documentation of this file.
1 
7 #ifndef OBSTRING_H
8 #define OBSTRING_H
9 
10 #include "offbrand.h"
11 #include "obvector.h"
12 #include <regex.h>
13 
15 typedef struct obstring_struct obstring;
16 
17 
18 /* PUBLIC METHODS */
19 
35 obstring * obstring_new(const char *str);
36 
55 obstring * obstring_copy_substring(const obstring *s, int64_t start,
56  uint32_t length);
57 
65 uint32_t obstring_length(const obstring *s);
66 
78 char obstring_char_at_index(const obstring *s, int64_t i);
79 
90 obstring * obstring_concat(const obstring *s1, const obstring *s2);
91 
103 const char * obstring_cstring(const obstring *s);
104 
122 obvector * obstring_split(const obstring *s, const char *delim);
123 
137 uint8_t obstring_find_substring(const obstring *s, const char *to_find);
138 
154 obstring * obstring_match_regex(const obstring *s, const char *regex);
155 
156 #endif
157