summaryrefslogtreecommitdiff
path: root/src/core/string.c
Commit message (Collapse)AuthorAgeFilesLines
* String: remove innards from public header.John-Mark Bell2019-06-291-13/+13
| | | | | | | | | A dom_string is the first member of the underlying dom_string_internal and thus their addresses are equivalent. We shouldn't be exposing the internal alignment requirements through the public header at all, so remove the bogus _ALIGNED and cast through void internally to tell the compiler that we know what we're doing.
* Optimise dom_string_tolower where interned string was already lower case.Michael Drake2016-01-311-23/+45
| | | | | Now we detect that the string was lower case, and return a new ref to the same dom_string.
* Optimise dom_string_(toupper|tolower) functions.Michael Drake2016-01-291-31/+9
| | | | | Since we don't support non-ascii strings here, the lpu calls to step though the characters was an unecessary overhead.
* make core string handling functions cope with NULL dom_string being passedVincent Sanders2014-01-241-2/+17
|
* Fix STRIP_TRAILING to work fully when COLLAPSE isn't requested.Michael Drake2014-01-241-2/+6
|
* Strip and collapse whitespace when gathering html option values.Michael Drake2014-01-231-2/+82
|
* Fix use of incorrect variable in dom_string(_caseless)_isequalJohn-Mark Bell2012-12-311-4/+4
|
* DOMString: Add toupper and tolower methodsDaniel Silverstone2012-07-211-1/+115
|
* DOMString.replace: Swap source/target in byte counterDaniel Silverstone2012-07-051-2/+2
|
* Force dom_string to have maximal alignment requirements.John Mark Bell2012-04-011-9/+9
| | | | | | Make it clear that dom_string_internal extends it svn path=/trunk/libdom/; revision=13785
* Actually handle errors from lwc_string_caseless_isequalDaniel Silverstone2012-03-291-3/+5
| | | | svn path=/trunk/libdom/; revision=13773
* Promote ref/unref in dom_string to be inline -- This implementation is a bit ↵Daniel Silverstone2012-03-281-80/+70
| | | | | | ugly svn path=/trunk/libdom/; revision=13762
* Squash scan-build issuesDaniel Silverstone2012-03-251-2/+1
| | | | svn path=/trunk/libdom/; revision=13686
* clang compatibility.Rob Kendrick2012-03-251-1/+1
| | | | svn path=/trunk/libdom/; revision=13673
* Complete dom_string / lwc_string comparison function.Michael Drake2012-03-251-4/+32
| | | | svn path=/trunk/libdom/; revision=13652
* Guarantee that dom_strings are NUL terminatedJohn Mark Bell2012-03-251-6/+12
| | | | svn path=/trunk/libdom/; revision=13646
* Fix malloc(0)Daniel Silverstone2012-03-241-1/+1
| | | | svn path=/trunk/libdom/; revision=13645
* Make libdom build with clang, for it is more anal than gcc.Rob Kendrick2012-03-241-1/+2
| | | | svn path=/trunk/libdom/; revision=13637
* API for comparing dom_string with lwc_string. Caseless version not ↵Michael Drake2012-03-241-0/+54
| | | | | | implemented yet. svn path=/trunk/libdom/; revision=13592
* Add constructor which auto-interns dataJohn Mark Bell2012-02-061-17/+28
| | | | svn path=/trunk/libdom/; revision=13427
* Fix comparison of interned and non-interned dom strings. Constify dom ↵Michael Drake2011-12-221-9/+13
| | | | | | string data accessers. svn path=/trunk/libdom/; revision=13327
* Move dom_string data accessing functions to public header.Michael Drake2011-12-221-26/+26
| | | | svn path=/trunk/libdom/; revision=13322
* Merge branches/jmb/dom-alloc-purge back to trunkJohn Mark Bell2011-12-211-324/+201
| | | | svn path=/trunk/libdom/; revision=13316
* s/struct dom_string/dom_string/gJohn Mark Bell2011-04-071-38/+38
| | | | svn path=/trunk/libdom/; revision=12172
* Make libdom work again given lack of init/finalise in hubbub and prepare ↵Daniel Silverstone2010-12-041-2/+0
| | | | | | initial attempt at importing tests into the makefile svn path=/trunk/dom/; revision=10992
* Sync with modified libwapcaplet API: 11 additional DOM Level1 testsuite ↵John Mark Bell2010-08-261-75/+20
| | | | | | failures. Most importantly, it actually compiles now. svn path=/trunk/dom/; revision=10717
* 1. Fix a string intern bug.Bo Yang2009-08-131-0/+2
| | | | | | 2. Reset the fields when finalise a dom_event. svn path=/trunk/dom/; revision=9247
* Merge the Events module (branches/struggleyb/libdom-events) back to trunk. :)Bo Yang2009-08-131-1/+25
| | | | svn path=/trunk/dom/; revision=9236
* Fix up the merge.Bo Yang2009-08-121-0/+2
| | | | svn path=/trunk/dom/; revision=9207
* Merge the branches/struggleyb/libdom-remain back to trunk.Bo Yang2009-08-111-21/+337
| | | | svn path=/trunk/dom/; revision=9191
* Squash warningsJohn Mark Bell2009-03-251-9/+6
| | | | svn path=/trunk/dom/; revision=6885
* Make hubbub parser binding build trees correctly (credit: Bo Yang)John Mark Bell2009-03-051-0/+8
| | | | svn path=/trunk/dom/; revision=6711
* Rationalise dom_string (some consideration is required as to what happens ↵John Mark Bell2009-03-031-508/+124
| | | | | | | | | wrt interning -- lwc_strings should probably be used) Purge charset handling -- a) documents are always converted to utf-8 b) use parserutils for utf-8 handling Fix Hubbub binding to compile. svn path=/trunk/dom/; revision=6682
* Add, and implement, dom_string_insert() and dom_string_replace() APIJohn Mark Bell2007-11-031-5/+266
| | | | | | | | | | | | | 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
* Make the dom string class more useful.John Mark Bell2007-10-031-43/+379
| | | | | | | | Purge all trace of dom_string_get_data() from outside the dom string implementation. Port affected code to new, more useful, APIs. This also fixes the interned node name strings mentioned in the previous commit. svn path=/trunk/dom/; revision=3621
* DOM Strings are now capable of containing either UTF-8 or UTF-16 encoded data.John Mark Bell2007-09-301-13/+80
| | | | | | | | | | | | | | | | | | The charset used for strings within a document is specified at document creation time. Whilst it is possible to mix charsets within a document, it's not recommended. Things that need fixing: + dom_string_get_data() doesn't return the charset. Better would be to permit the client to request a charset for the data to be returned in. + Interned node name strings will break if the document is UTF-16 (dom_document_create()). In fact, these could quite happily be globals, rather than allocating a set for each document. + Other usage of dom string constructors need checking for sanity + DOM Strings need to gain more utility APIs (such as getting the character length of a string, string concatenation etc). svn path=/trunk/dom/; revision=3614
* Assume that NULL dom_string pointers imply the empty string.John Mark Bell2007-09-221-0/+17
| | | | svn path=/trunk/dom/; revision=3561
* Add extra dom_string constructor that permits strings to be manufactured in ↵John Mark Bell2007-07-141-10/+80
| | | | | | | | the situation where there exists no document. This should only be used in order to create dom_strings for use by DocumentType and Document constructors -- in any other situation, a suitable document already exists. svn path=/trunk/dom/; revision=3411
* Warning fixesJohn Mark Bell2007-07-101-2/+4
| | | | svn path=/trunk/dom/; revision=3396
* Add NodeList and string comparison APIJohn Mark Bell2007-07-101-0/+54
| | | | svn path=/trunk/dom/; revision=3394
* Purge all trace of the ballache that was dom_ctx.John Mark Bell2007-07-061-39/+36
| | | | | | Document the functions in document.c svn path=/trunk/dom/; revision=3385
* Import DOM library.John Mark Bell2007-07-061-0/+222
This is mainly stub functions atm (and is missing a number of key interfaces). svn path=/trunk/dom/; revision=3384