string s = "Hello World"; string s_sub = s.substring(6, 5); // s_sub now contains "World"
string s = "Good morning, John"; int start = 5; int length = 7; string s_sub = s.substring(start, length); // s_sub now contains "morning"
string s = "Hello"; string s_sub = s.substring(1, 1); // s_sub now contains "e"The C++ string class is part of the standard library.