char& front() - JanKulbaga/String-CPP GitHub Wiki
Returns a reference to the first character of the string. This function shall not be called on empty strings.
#include <ostream>
#include "src/String.h"
int main()
{
String s = "Hello World";
char& c = s.front();
std::cout << c;
return 0;
}Output:
HNone
A reference to the first character in the string.