string.startsWith() and other associated functions

They files are WString.h and WString.cpp. They are in the core library, the location of which depends on which board you have selected from the Arduino IDE's Tools > Board menu.

Here's an easy way to find the location of the active core library:

  • Select a board from the hardware package from the Tools > Board menu
  • File > Examples > SPI > BarometricPressureSensor
  • Sketch > Show Sketch Folder
  • Move up folder levels until you reach the one that contains boards.txt
  • You will find the core library in the cores/{core name} subfolder, where {core name} is set by the build.core field of the selected board in boards.txt (often there is only one core library in a hardware package and thus you would not need to check which the board uses).

Interestingly the rogerclarkmelbourne/Arduino_STM32 package has a version of WString for STM32F1 and STM32F4 but not STM32F3.