diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-08 14:57:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-08 14:57:41 +0100 |
commit | 6c17ff84ad8f2be64ddc9bd4955e1cc87842ac29 (patch) | |
tree | 48f9a7c9169dc29106f18a4ed13010e255d52bcb /libavutil/avstring.c | |
parent | 80f91a70be5f03fc95eb89d222d760eeaf91b135 (diff) | |
parent | efa7f4202088c70caba11d7834641bc6eaf41830 (diff) | |
download | ffmpeg-6c17ff84ad8f2be64ddc9bd4955e1cc87842ac29.tar.gz |
Merge commit 'efa7f4202088c70caba11d7834641bc6eaf41830'
* commit 'efa7f4202088c70caba11d7834641bc6eaf41830':
Use the avstring.h locale-independent character type functions
avstring: Add locale independent versions of some ctype.h functions
Conflicts:
avprobe.c
doc/APIchanges
libavcodec/dvdsubdec.c
libavcodec/utils.c
libavutil/avstring.c
libavutil/avstring.h
libavutil/eval.c
libavutil/parseutils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/avstring.c')
-rw-r--r-- | libavutil/avstring.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libavutil/avstring.c b/libavutil/avstring.c index 45f8d78172..788667e9d6 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -285,6 +285,28 @@ int av_escape(char **dst, const char *src, const char *special_chars, } } +int av_isdigit(int c) +{ + return c >= '0' && c <= '9'; +} + +int av_isgraph(int c) +{ + return c > 32 && c < 127; +} + +int av_isspace(int c) +{ + return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || + c == '\v'; +} + +int av_isxdigit(int c) +{ + c = av_tolower(c); + return av_isdigit(c) || (c >= 'a' && c <= 'z'); +} + #ifdef TEST int main(void) |