
{"id":4867,"date":"2023-07-22T00:44:57","date_gmt":"2023-07-22T04:44:57","guid":{"rendered":"https:\/\/ikriv.com\/blog\/?p=4867"},"modified":"2023-07-22T00:44:57","modified_gmt":"2023-07-22T04:44:57","slug":"c-23","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=4867","title":{"rendered":"C++ 23"},"content":{"rendered":"<p>There is a rumor C++ 23 introduces method <a href=\"https:\/\/en.wikipedia.org\/wiki\/C%2B%2B23\">string::contains<\/a> that checks whether a string contains a substring. I guess in mere 10-20 years we will have <code>string::toupper<\/code> and <code>string::tolower<\/code>. Here&#8217;s an abridged timeline of C++ string support:<\/p>\n<p><b>1979<\/b> C++ language created without a standard string class<br \/>\nFor 19 years, everyone was writing their own string implementation<\/p>\n<p><b>1998<\/b> std::string becomes part of the standard<br \/>\nFor 25 years everyone has to use <code>s.find(substr) == string::npos<\/code><\/p>\n<p><b>2023<\/b> We are blessed with <code>string::contains<\/code> method!<br \/>\n<code>toupper<\/code> is still not there; we have <code>boost::algorithm::to_upper_copy()<\/code>, which may or may not be available.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s <a href=\"https:\/\/ikriv.com\/blog\/?p=4867\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[1],"tags":[],"class_list":["entry","author-ikriv","post-4867","post","type-post","status-publish","format-standard","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4867"}],"version-history":[{"count":2,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4867\/revisions"}],"predecessor-version":[{"id":4869,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4867\/revisions\/4869"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}