summaryrefslogtreecommitdiff
path: root/include/dom/core/string.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-11-03 21:18:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-11-03 21:18:02 +0000
commitd4d0364f52a658469fea937e87c6317ec21644c0 (patch)
treeb1790306d273670edcddcf7cad0afd29e6b81354 /include/dom/core/string.h
parente41d0a993986cf63ea3b3129effd62d2afade6b1 (diff)
downloadlibdom-d4d0364f52a658469fea937e87c6317ec21644c0.tar.gz
libdom-d4d0364f52a658469fea937e87c6317ec21644c0.tar.bz2
Add, and implement, dom_string_insert() and dom_string_replace() API
Fix dom_string_substr() to have correct length limits when calling _dom_utf{8,16}_next() Fix dom_string_substr() to calculate correct length of output string when creating from ptr Implement dom_characterdata_get_length() Implement dom_characterdata_substring_data() Implement dom_characterdata_append_data() Implement dom_characterdata_insert_data() Implement dom_characterdata_delete_data() Implement dom_characterdata_replace_data() svn path=/trunk/dom/; revision=3641
Diffstat (limited to 'include/dom/core/string.h')
-rw-r--r--include/dom/core/string.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dom/core/string.h b/include/dom/core/string.h
index 584db00..e3dfa30 100644
--- a/include/dom/core/string.h
+++ b/include/dom/core/string.h
@@ -63,6 +63,16 @@ dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2,
dom_exception dom_string_substr(struct dom_string *str,
uint32_t i1, uint32_t i2, struct dom_string **result);
+/* Insert data into a dom string at the given location */
+dom_exception dom_string_insert(struct dom_string *target,
+ struct dom_string *source, uint32_t offset,
+ struct dom_string **result);
+
+/* Replace a section of a dom string */
+dom_exception dom_string_replace(struct dom_string *target,
+ struct dom_string *source, uint32_t i1, uint32_t i2,
+ struct dom_string **result);
+
/* Duplicate a dom string */
dom_exception dom_string_dup(struct dom_string *str,
struct dom_string **result);