diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-25 11:11:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-25 11:11:31 -0500 |
commit | 84faeb07d0018c674c2bc730333fefae6123f366 (patch) | |
tree | 61c974e7925f08fd6ba364ba0165922c3ef4acd2 /src/nvim/ascii.h | |
parent | 8c8cc35926f265bf4f048b83fd130bef3932851e (diff) | |
parent | 43834b24ac6037ec7678872877d3370134e46024 (diff) | |
download | rneovim-84faeb07d0018c674c2bc730333fefae6123f366.tar.gz rneovim-84faeb07d0018c674c2bc730333fefae6123f366.tar.bz2 rneovim-84faeb07d0018c674c2bc730333fefae6123f366.zip |
Merge pull request #13602 from janlazo/vim-8.2.2206
vim-patch:8.1.2212,8.2.{51,782,856,1174,1212,2206,2211}
Diffstat (limited to 'src/nvim/ascii.h')
-rw-r--r-- | src/nvim/ascii.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h index 2397af27cc..f41068ea70 100644 --- a/src/nvim/ascii.h +++ b/src/nvim/ascii.h @@ -89,6 +89,10 @@ static inline bool ascii_iswhite(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; +static inline bool ascii_iswhite_or_nul(int) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; + static inline bool ascii_isdigit(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; @@ -117,6 +121,14 @@ static inline bool ascii_iswhite(int c) return c == ' ' || c == '\t'; } +/// Checks if `c` is a space or tab character or NUL. +/// +/// @see {ascii_isdigit} +static inline bool ascii_iswhite_or_nul(int c) +{ + return ascii_iswhite(c) || c == NUL; +} + /// Check whether character is a decimal digit. /// /// Library isdigit() function is officially locale-dependent and, for |