在线文档教程
C++
字符串 | Strings

std::char_traits::lt

STD::CHAR[医]性状:EQ,STD::CHAR[医]特点:

(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比较ab为了平等。

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

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如果ab是平等的,false否则。

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

例外

(none)(until C++11)
noexcept specification: noexcept(since C++11)

复杂性

常量。

© cppreference.com

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

http://en.cppreference.com/w/cpp/string/char[医]性状/CMP