Tamarin:Strings: Difference between revisions

Jump to navigation Jump to search
m
m (fix typo)
m (→‎Data access: fix typo)
Line 33: Line 33:
=== Data access ===
=== Data access ===


Direct access to the data buffer is not longer possible, since it is not guaranteed that the string data is unique, or even writable. Therefore, the <tt>c_str()</tt> method is gone. It is till possible to access single characters via the <tt>charAt()</tt> method or the <tt>StringIndexer</tt> class. The latter class is a fast way to iterate through the string data.
Direct access to the data buffer is not longer possible, since it is not guaranteed that the string data is unique, or even writable. Therefore, the <tt>c_str()</tt> method is gone. It is still possible to access single characters via the <tt>charAt()</tt> method or the <tt>StringIndexer</tt> class. The latter class is a fast way to iterate through the string data.


Example:
Example:
10

edits

Navigation menu