Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

shellext: add new contains function to TortoiseUtils

Changeset 45a95cee4988

Parent d161796fd1a9

by Adrian Buehlmann

Changes to one file · Browse files at 45a95cee4988 Showing diff from parent d161796fd1a9 Diff from another changeset...

 
29
30
31
 
 
 
 
 
 
 
 
 
 
 
32
 
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@@ -29,4 +29,15 @@
 void Tokenize(const std::string& str, std::vector<std::string>& tokens,   const std::string& delimiters = " ");   +template <typename C, typename T> +bool contains(const C& c, const T& t) +{ + for (C::const_iterator i = c.begin(); i != c.end(); ++i) + { + if (*i == t) + return true; + } + return false; +} +  #endif