/[svn]/gigedit/trunk/src/gigedit/global.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/global.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3175 by schoenebeck, Mon May 8 17:30:10 2017 UTC revision 3176 by schoenebeck, Thu May 11 11:36:33 2017 UTC
# Line 122  template<class T> inline std::string ToS Line 122  template<class T> inline std::string ToS
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)

Legend:
Removed from v.3175  
changed lines
  Added in v.3176

  ViewVC Help
Powered by ViewVC