|
@@ -197,6 +197,27 @@ public: |
|
|
return !(*this == s); |
|
|
return !(*this == s); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline bool operator ==(char const* sz) const |
|
|
|
|
|
{ |
|
|
|
|
|
int i; |
|
|
|
|
|
for (i = 0; i < this->m_count; ++i) |
|
|
|
|
|
{ |
|
|
|
|
|
if (i < this->m_count - 1 && sz[i] == '\0') |
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if ((*this)[i] != sz[i]) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline bool operator !=(char const* sz) const |
|
|
|
|
|
{ |
|
|
|
|
|
return !(*this == sz); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#ifdef __GNUC__ |
|
|
#ifdef __GNUC__ |
|
|
# define LOL_FMT_ATTR(n, p) __attribute__((format(printf, n, p))) |
|
|
# define LOL_FMT_ATTR(n, p) __attribute__((format(printf, n, p))) |
|
|
#else |
|
|
#else |
|
@@ -207,6 +228,16 @@ public: |
|
|
static String Printf(char const *format, va_list ap); |
|
|
static String Printf(char const *format, va_list ap); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
inline bool operator ==(char const* sz, String const &s) |
|
|
|
|
|
{ |
|
|
|
|
|
return s == sz; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline bool operator !=(char const* sz, String const &s) |
|
|
|
|
|
{ |
|
|
|
|
|
return s != sz; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} /* namespace lol */ |
|
|
} /* namespace lol */ |
|
|
|
|
|
|
|
|
#endif // __LOL_BASE_STRING_H__ |
|
|
#endif // __LOL_BASE_STRING_H__ |
|
|