You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several functions in ascii.h, such as the ascii_is*() functions, operate on characters but not strings. Most of these functions would be meaningful on strings too, e.g. to express that a string consists entirely of a given ASCII subset.
I just added this to my codebase, but it feels like Abseil could reasonably provide this alongside the char functions:
FWIW this was motivated by grpc/grpc#34798 - gRPC requires callers ensure their metadata strings are printable ASCII, but (AFAICT) does not provide an API to validate this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Several functions in ascii.h, such as the
ascii_is*()
functions, operate on characters but not strings. Most of these functions would be meaningful on strings too, e.g. to express that a string consists entirely of a given ASCII subset.I just added this to my codebase, but it feels like Abseil could reasonably provide this alongside the char functions:
FWIW this was motivated by grpc/grpc#34798 - gRPC requires callers ensure their metadata strings are printable ASCII, but (AFAICT) does not provide an API to validate this.
Beta Was this translation helpful? Give feedback.
All reactions