mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-08 19:55:47 +00:00
shared: add nm_is_ascii()
glib's is{alnum,alpha,ascii,...}() functions perform the check based on the current locale. Probably using isascii() would be fine anyway, but add a NM version that just checks that the upper bit is zero.
This commit is contained in:
parent
94ded0c5b2
commit
8113069062
|
@ -8,6 +8,12 @@
|
|||
|
||||
#include <netinet/in.h>
|
||||
|
||||
static inline gboolean
|
||||
nm_is_ascii (char ch)
|
||||
{
|
||||
return ((uint8_t) ch) < 128;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
pid_t nm_utils_gettid (void);
|
||||
|
|
Loading…
Reference in New Issue
Block a user