From d4d0364f52a658469fea937e87c6317ec21644c0 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 3 Nov 2007 21:18:02 +0000 Subject: 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 --- include/dom/core/string.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/dom/core') 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); -- cgit v1.2.3