Skip to content

Commit

Permalink
Global string to string literal comparison operators
Browse files Browse the repository at this point in the history
  • Loading branch information
AerialX committed Nov 16, 2013
1 parent 004676b commit 1d862fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/bricks/core/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ namespace Bricks {
};

static inline String operator +(const char* lhs, const String& rhs) { return String(lhs) + rhs; }
static inline bool operator==(const String& lhs, const char* rhs) { return !lhs.Compare(rhs); }
static inline bool operator!=(const String& lhs, const char* rhs) { return lhs.Compare(rhs); }
static inline bool operator==(const char* lhs, const String& rhs) { return !rhs.Compare(lhs); }
static inline bool operator!=(const char* lhs, const String& rhs) { return rhs.Compare(lhs); }
}

0 comments on commit 1d862fa

Please sign in to comment.