In JUCE, text is generally manipulated using the
String class. In many ways, this class may be seen as an alternative to the C++ Standard Library
std::string class. We have already used the
String class for the basic operations in earlier chapters. For example, in Chapter 2, Building User Interfaces, strings were used to set the text appearing on a
TextButton object and used to store a dynamically changing string to display in response to mouse activity. Even though these examples were quite simple, they harnessed the power of the
String class to make setting and manipulating the strings straightforward for the user.
The first way this is achieved is through storing strings using reference counted objects ...