November 2019
Intermediate to advanced
404 pages
12h 9m
English
We briefly touched upon the subject of strings in Chapter 2, Scripting Strategies, but now it's time to go into more detail about why proper string usage is extremely important.
Strings are essentially arrays of characters, and so they are considered reference types and follow all of the same rules as other reference types; they will be allocated on the heap, and a pointer is all that is copied from one method to the next. Since a string is effectively an array, this implies that the characters it contains must be contiguous in memory. However, we often find ourselves expanding, contracting, or combining strings to create other strings. This can lead us to make some faulty assumptions about how strings ...
Read now
Unlock full access