src/string.h
branchNewGRF_ports
changeset 6868 7eb395287b3d
parent 6743 cabfaa4a0295
child 8609 8c0c3e9dd6a0
equal deleted inserted replaced
6867:a4ad48192617 6868:7eb395287b3d
    47 
    47 
    48 /** Convert the given string to lowercase, only works with ASCII! */
    48 /** Convert the given string to lowercase, only works with ASCII! */
    49 void strtolower(char *str);
    49 void strtolower(char *str);
    50 
    50 
    51 
    51 
    52 static inline bool StrEmpty(const char *s) { return s[0] == '\0'; }
    52 static inline bool StrEmpty(const char *s) { return s == NULL || s[0] == '\0'; }
    53 
    53 
    54 
    54 
    55 /** Get the length of a string, within a limited buffer */
    55 /** Get the length of a string, within a limited buffer */
    56 static inline int ttd_strnlen(const char *str, int maxlen)
    56 static inline int ttd_strnlen(const char *str, int maxlen)
    57 {
    57 {