bool startsWith() - JanKulbaga/String-CPP GitHub Wiki
bool startsWith()
The startsWith() method determines whether a string starts with the characters of a specified string, returning true or false as appropriate.
Example
#include "src/String.h"
int main()
{
String s = "Hello World";
s.startsWith("H"); // gives value 1
s.startsWith("W"); // gives value 0
return 0;
}
Parameters
const char* const str
Return value
true if the given characters are found at the start of the string, otherwise false