substrで長さ以上切り取るとどうなるのか?

s = "abcde";
string t = s.substr(2, 10);
p(t);
p(t.length());
cde
3
  • 気が利いています