diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-10 03:41:03 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-10 03:41:03 -0700 |
| commit | 4e201e6a70e60d24b22ce62109b5af3d90c0a27e (patch) | |
| tree | 66fe24760a34e66019b16b59444ddd606d3e009d /utils.h | |
| parent | aa0b8fc59168c9b86eeae311702133a0b896d2c8 (diff) | |
Added dashes to identifiers
Diffstat (limited to 'utils.h')
| -rw-r--r-- | utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -31,6 +31,16 @@ static inline const char *after_spaces(const char *str) return str; } +static inline const char *after_name(const char *str) +{ + if (!isalpha(*str)) return NULL; + for (++str; *str; ++str) { + if (!(isalnum(*str) || *str == '-')) + break; + } + return str; +} + static inline int matchchar(const char **str, char c) { *str = after_spaces(*str); |
