首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::ctype<char>::is

Defined in header <locale>

?

?

bool is(mask m, char c) const;

(1)

?

const char* is(const char* low, const char* high, mask* vec) const;

(2)

?

1%29检查字符是否c按面具分类m根据成员函数返回的分类表table().有效地计算table()[(unsigned char)c] & m

2%29对字符数组中的每个字符[low, high),从成员函数返回的分类表中读取其完整的分类掩码。table()%28,即,评估table()[ (unsigned char)*p]并将其存储在vec

如果(unsignedchar)c >=std::ctype<char>::table_size,则替换一个实现定义的值,而不是table()[(unsigned char)c]的值不同,可能会有所不同。c...

参数

c

-

character to classify

m

-

mask to use for classifying a single character

low

-

pointer to the first character in an array of characters to classify

high

-

one past the end pointer for the array of characters to classify

vec

-

pointer to the first element of the array of masks to fill

返回值

1%29true如果cmtable()

2%29high

注记

与主模板不同std::ctype,此专门化在对字符进行分类时不执行虚拟函数调用。要自定义行为,派生类可以向基类构造函数提供非默认的分类表。

另见

do_is virtual

classifies a character or a character sequence (virtual protected member function of std::ctype)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com