Pjsip中一些有用的基本函数实现

本文摘录了Pjsip代码中常用的C语言基础函数实现,为今后查阅和使用提供便利。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近在看些Pjsip的代码,想着把其中经常使用到的基本函数实现代码摘出,供以后有需要的时候使用。

这部分代码,都是C的。

#  define isalnum(c)        (isalpha(c) || isdigit(c))
#  define isalpha(c)        (islower(c) || isupper(c))
#  define isascii(c)        (((unsigned char)(c))<=0x7f)
#  define isdigit(c)        ((c)>='0' && (c)<='9')
#  define isspace(c)        ((c)==' '  || (c)=='\t' ||\
                             (c)=='\n' || (c)=='\r' || (c)=='\v')
#  define islower(c)        ((c)>='a' && (c)<='z')
#  define isupper(c)        ((c)>='A' && (c)<='Z')
#  define isxdigit(c)       (isdigit(c) || (tolower(c)>='a'&&tolower(c)<='f'))
#  define tolower(c)        (((c) >= 'A' && (c) <= 'Z') ? (c)+('a'-'A') : (c))
#  define toupper(c)        (((c) >= 'a' && (c) <= 'z') ? (c)-('a'-'A') : (c))

#ifndef isblank
#   define isblank(c)       (c==' ' || c=='\t')
#endif

                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值