I have a long string of urlParams, I would like to check if the keys in my string exist in the hashMap, one option would be to use std::string.substr
to extract the keys from the source string and check if they are in the hashmap, however, I would like to avoid creating new objects.
Is there a way to check if my key in the hashmap by providing the source string, and the position of my key in that source?
I use a simple hashmap std::map<std::string, std::string>
, but I can change it if you think it can help