diff options
author | Nicolas Williams <nico@cryptonector.com> | 2013-11-28 14:48:46 -0600 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2013-12-04 18:21:38 -0600 |
commit | 08b4a34a8ece5917baf25d2b594f03d43aa1c437 (patch) | |
tree | 23db949733bef767fe534896c83d760aeffcc153 /jv.h | |
parent | 1fc56567621bd5ff8e3d5004b12558a285974c98 (diff) |
Add jv string utility functions
jv_string_empty()
-> return an empty string with given allocated length (for fast
appends)
jv_string_append_codepoint
-> append a single codepoint (int) to the given string
jv_string_explode
-> return an array of codepoints making up a string
jv_string_implode
-> return the UTF-8 encoding of an array of codepoint numbers
Diffstat (limited to 'jv.h')
-rw-r--r-- | jv.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -75,14 +75,18 @@ jv jv_array_slice(jv, int, int); jv jv_string(const char*); jv jv_string_sized(const char*, int); +jv jv_string_empty(int len); int jv_string_length_bytes(jv); int jv_string_length_codepoints(jv); unsigned long jv_string_hash(jv); const char* jv_string_value(jv); jv jv_string_concat(jv, jv); jv jv_string_fmt(const char*, ...); +jv jv_string_append_codepoint(jv a, int c); jv jv_string_append_buf(jv a, const char* buf, int len); jv jv_string_append_str(jv a, const char* str); +jv jv_string_explode(jv j); +jv jv_string_implode(jv j); jv jv_object(); jv jv_object_get(jv object, jv key); |