(svn r8097) Replace strlen() {==,!=,>} 0 by the more concise {,!}StrEmpty(). Additionally the test takes O(1) instead of O(n) now

This commit is contained in:
tron
2007-01-13 15:00:16 +00:00
parent 64f34d322d
commit e043c6cef7
5 changed files with 13 additions and 9 deletions

View File

@@ -47,6 +47,9 @@ typedef enum CharSetFilter {
void strtolower(char *str);
static inline bool StrEmpty(const char* s) { return s[0] == '\0'; }
/** Get the length of a string, within a limited buffer */
static inline int ttd_strnlen(const char *str, int maxlen)
{