diff options
Diffstat (limited to 'src/nvim/ascii.h')
-rw-r--r-- | src/nvim/ascii.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h index f41068ea70..7b5e82cd3f 100644 --- a/src/nvim/ascii.h +++ b/src/nvim/ascii.h @@ -169,6 +169,14 @@ static inline bool ascii_isbdigit(int c) return (c == '0' || c == '1'); } +/// Checks if `c` is an octal digit, that is, 0-7. +/// +/// @see {ascii_isdigit} +static inline bool ascii_isodigit(int c) +{ + return (c >= '0' && c <= '7'); +} + /// Checks if `c` is a white-space character, that is, /// one of \f, \n, \r, \t, \v. /// |