2
¿Por qué `std :: string :: find ()` no devuelve el iterador final en caso de fallas?
Encuentro el comportamiento de std::string::findser inconsistente con los contenedores estándar de C ++. P.ej std::map<int, int> myMap = {{1, 2}}; auto it = myMap.find(10); // it == myMap.end() Pero por una cuerda, std::string myStr = "hello"; auto it = myStr.find('!'); // it == std::string::npos ¿Por qué no debería la myStr.find('!')devolución …