mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
comments
This commit is contained in:
parent
4786360d41
commit
2c05215281
@ -222,7 +222,7 @@ namespace mongo {
|
||||
* indexes and the other representing constraints for multi key indexes and
|
||||
* unindexed scans. In several member functions the caller is asked to
|
||||
* supply an index so that the implementation may utilize the proper
|
||||
* FieldRangeSet and return results that are appropriate with respect to the
|
||||
* FieldRangeSet and return results that are appropriate with respect to that
|
||||
* supplied index.
|
||||
*/
|
||||
class FieldRangeSetPair {
|
||||
|
@ -104,13 +104,13 @@ namespace mongoutils {
|
||||
return strchr(s.c_str(), x) != 0;
|
||||
}
|
||||
|
||||
/** @return everything befor the character x, else entire string */
|
||||
/** @return everything before the character x, else entire string */
|
||||
inline string before(const string& s, char x) {
|
||||
const char *p = strchr(s.c_str(), x);
|
||||
return (p != 0) ? s.substr(0, p-s.c_str()) : s;
|
||||
}
|
||||
|
||||
/** @return everything befor the string x, else entire string */
|
||||
/** @return everything before the string x, else entire string */
|
||||
inline string before(const string& s, const string& x) {
|
||||
const char *p = strstr(s.c_str(), x.c_str());
|
||||
return (p != 0) ? s.substr(0, p-s.c_str()) : s;
|
||||
|
Loading…
Reference in New Issue
Block a user