25 #ifndef COMMON_STRWORDMAP_H 26 #define COMMON_STRWORDMAP_H 30 #include <boost/unordered/unordered_map.hpp> 37 typedef std::map<UString, UString, UString::iless>
StringIMap;
39 typedef boost::unordered_map<UString, UString, hashUStringCaseSensitive>
StringHashMap;
40 typedef boost::unordered_map<UString, UString, hashUStringCaseInsensitive>
StringHashIMap;
48 StringListMap(
const char *
const *strings,
size_t count,
bool onlyFirstWord =
false);
56 size_t find(
const char *str,
const char **match)
const;
64 size_t find(
const UString &str,
const char **match)
const;
69 typedef boost::unordered_map<UString, size_t, hashUStringCaseInsensitive>
StrMap;
77 #endif // COMMON_STRWORDMAP_H std::map< UString, UString > StringMap
A class holding an UTF-8 string.
boost::unordered_map< UString, UString, hashUStringCaseInsensitive > StringHashIMap
A map to quickly match strings from a list.
StringListMap(const char *const *strings, size_t count, bool onlyFirstWord=false)
Build a string map to match a list of strings against.
std::map< UString, UString, UString::iless > StringIMap
boost::unordered_map< UString, UString, hashUStringCaseSensitive > StringHashMap
static const size_t kInvalidIndex
size_t find(const char *str, const char **match) const
Match a string against the map.
boost::unordered_map< UString, size_t, hashUStringCaseInsensitive > StrMap