Tamarin:String implementation: Difference between revisions

m
Line 227: Line 227:


This TT helper class was used to wrap a String instance (which contained UTF-8 data) into a class providing direct access to the string buffer. The new String code offers a stack-based <tt>StUTF8String</tt> containing UTF-8 data and provides access to that data. The pcre code needs this class and another class <tt>StIndexableUTF8String</tt> class, since pcre is UTF-8 based. This leads to a performance slowdown that could be avoided if a regular expression parser was used that worked with UTF-16 data.
This TT helper class was used to wrap a String instance (which contained UTF-8 data) into a class providing direct access to the string buffer. The new String code offers a stack-based <tt>StUTF8String</tt> containing UTF-8 data and provides access to that data. The pcre code needs this class and another class <tt>StIndexableUTF8String</tt> class, since pcre is UTF-8 based. This leads to a performance slowdown that could be avoided if a regular expression parser was used that worked with UTF-16 data.
=== StringNULLTerminatedUTF8 ===
This TT helper class returns a pointer to a null-terminated UTF-8 string. Again, this string is a temporary String instance containing this data.
55

edits