std :: correspondencia parcial del mapa para la clave
Tengo un std :: map y quiero buscar una clave usando una subcadena. Por ejemplo
#include <iostream>
#include <map>
#include <string>
using namespace std;
typedef std::map<std::string, std::string> TStrStrMap;
typedef std::pair<std::string, std::string> TStrStrPair;
int main(int argc, char *argv[])
{
TStrStrMap tMap;
tMap.insert(TStrStrPair("John", "AA"));
tMap.insert(TStrStrPair("Mary", "BBB"));
tMap.insert(TStrStrPair("Mother", "A"));
tMap.insert(TStrStrPair("Marlon", "C"));
return 0;
}
Quiero buscar la posición que contiene la subcadena "Marl" y no "Marlon". ¿Es posible? ¿Cómo
EDIT: ¡no hay bibliotecas de impulso!