首页
学习
活动
专区
圈层
工具
发布

std::char_traits::lt

​

(1)

​

static bool eq( char_type a, char_type b );

(until C++11)

static constexpr bool eq( char_type a, char_type b );

(since C++11)

​

(2)

​

static bool lt( char_type a, char_type b );

(until C++11)

static constexpr bool lt( char_type a, char_type b );

(since C++11)

比较两个字符。

1%29比较a和b为了平等。

2%29比较a和b以一种完全有序的方式。

For the char specialization, eq and lt are defined identically to the built-in operators == and < for type unsigned char (not char).

(since C++11)

参数

a, b

-

character values to compare

返回值

1%29true如果a和b是平等的,false否则。

2%29true如果a是再少点比b,,,false否则。

例外

(none)

(until C++11)

noexcept specification: noexcept

(since C++11)

复杂性

常量。

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

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

扫码关注腾讯云开发者

领取腾讯云代金券