122 |
return ss.str(); |
return ss.str(); |
123 |
} |
} |
124 |
|
|
125 |
|
inline static bool endsWith(const std::string& haystack, const std::string& needle, bool caseSensitive) { |
126 |
|
if (haystack.size() < needle.size()) return false; |
127 |
|
const std::string sub = haystack.substr(haystack.size() - needle.size(), needle.size()); |
128 |
|
return (caseSensitive) ? (sub == needle) : (!strcasecmp(sub.c_str(), needle.c_str())); |
129 |
|
} |
130 |
|
|
131 |
inline int getDimensionIndex(gig::dimension_t type, gig::Region* rgn) { |
inline int getDimensionIndex(gig::dimension_t type, gig::Region* rgn) { |
132 |
for (uint i = 0; i < rgn->Dimensions; ++i) |
for (uint i = 0; i < rgn->Dimensions; ++i) |
133 |
if (rgn->pDimensionDefinitions[i].dimension == type) |
if (rgn->pDimensionDefinitions[i].dimension == type) |