#10103
RainerRainer
Keymaster
    Up
    0
    Down
    ::
    map createTeleBook(const std::string& fileCont){                 
        
        map teleBook; 
        
        std::regex regColon(":");
        
        std::sregex_token_iterator fileContIt(fileCont.begin(), fileCont.end(), regColon, -1);
        const std::sregex_token_iterator fileContEndIt;
        
        std::string entry;
        std::string key;
        int value;
        while (fileContIt != fileContEndIt){                              
            entry = *fileContIt++;
            auto comma = entry.find(",");                                  
            key = entry.substr(0, comma);
            value = std::stoi(entry.substr(comma + 1, entry.length() -1));
            teleBook[key] = value;                                         
        }
        return teleBook;
        
    }