diff options
author | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
---|---|---|
committer | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
commit | aba54ed61e31df318abdfa165f971a11ce084608 (patch) | |
tree | 433c8bcde94fc7a6e6f2e5cbf23842a84db98146 /include/dom/core/string.h | |
parent | 4a8212d783b6d848ac5e23b2a5151caf19ce0a4f (diff) | |
download | libdom-aba54ed61e31df318abdfa165f971a11ce084608.tar.gz libdom-aba54ed61e31df318abdfa165f971a11ce084608.tar.bz2 |
Merge the branches/struggleyb/libdom-remain back to trunk.
svn path=/trunk/dom/; revision=9191
Diffstat (limited to 'include/dom/core/string.h')
-rw-r--r-- | include/dom/core/string.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/dom/core/string.h b/include/dom/core/string.h index 37d78d6..2502623 100644 --- a/include/dom/core/string.h +++ b/include/dom/core/string.h @@ -10,10 +10,12 @@ #include <inttypes.h> #include <stddef.h> +#include <libwapcaplet/libwapcaplet.h> #include <dom/functypes.h> #include <dom/core/exceptions.h> + typedef struct dom_string dom_string; /* Claim a reference on a DOM string */ @@ -25,6 +27,14 @@ void dom_string_unref(struct dom_string *str); dom_exception dom_string_create(dom_alloc alloc, void *pw, const uint8_t *ptr, size_t len, struct dom_string **str); +/* Clone a dom_string */ +dom_exception dom_string_clone(dom_alloc alloc, void *pw, + struct dom_string *str, struct dom_string **ret); + +/* Get the internal lwc_string */ +dom_exception dom_string_get_intern(struct dom_string *str, + struct lwc_context_s **ctx, struct lwc_string_s **lwcstr); + /* Case sensitively compare two DOM strings */ int dom_string_cmp(struct dom_string *s1, struct dom_string *s2); /* Case insensitively compare two DOM strings */ @@ -38,6 +48,12 @@ uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr); /* Get the length, in characters, of a dom string */ uint32_t dom_string_length(struct dom_string *str); +/* Get the UCS-4 character at position index, the index should be in + * [0, length), and length can be get by calling dom_string_length + */ +dom_exception dom_string_at(struct dom_string *str, uint32_t index, + uint32_t *ch); + /* Concatenate two dom strings */ dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2, struct dom_string **result); |