summaryrefslogtreecommitdiff
path: root/include
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
commitc3e3c1ce237a5b382f936b412842a1c9ba3e09b2 (patch)
treeb1790306d273670edcddcf7cad0afd29e6b81354 /include
parent8b8632f0bcf2d59217211ecc6a22636738e9d59a (diff)
downloadlibdom-c3e3c1ce237a5b382f936b412842a1c9ba3e09b2.tar.gz
libdom-c3e3c1ce237a5b382f936b412842a1c9ba3e09b2.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')
-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);