C++ 23

There is a rumor C++ 23 introduces method string::contains that checks whether a string contains a substring. I guess in mere 10-20 years we will have string::toupper and string::tolower. Here’s an abridged timeline of C++ string support:

1979 C++ language created without a standard string class
For 19 years, everyone was writing their own string implementation

1998 std::string becomes part of the standard
For 25 years everyone has to use s.find(substr) == string::npos

2023 We are blessed with string::contains method!
toupper is still not there; we have boost::algorithm::to_upper_copy(), which may or may not be available.

Leave a Reply

Your email address will not be published. Required fields are marked *