YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
null-terminated character string utilities

简单 NTCTS 操作。 更多...

函数

template<typename _tChar >
size_t ystdex::ntctslen (const _tChar *s)
 计算简单 NTCTS 长度。 更多...
 
template<typename _tChar >
std::char_traits< _tChar >
::int_type 
ystdex::ntctscmp (const _tChar *s1, const _tChar *s2)
 按字典序比较简单 NTCTS 。 更多...
 
template<typename _tChar >
std::char_traits< _tChar >
::int_type 
ystdex::ntctsicmp (const _tChar *s1, const _tChar *s2)
 按字典序比较简单 NTCTS (忽略大小写)。 更多...
 
template<typename _tChar >
size_t ystdex::const_ntctslen (const _tChar *s)
 计算简单 NTCTS 长度。 更多...
 
template<typename _tChar >
size_t ystdex::const_ntctscnt (const _tChar *s, _tChar c)
 计算简单 NTCTS 中的指定字符数。 更多...
 
template<typename _tChar >
std::char_traits< _tChar >
::int_type 
ystdex::const_ntctscmp (const _tChar *s1, const _tChar *s2)
 比较简单 NTCTS 。 更多...
 
template<typename _tChar >
std::char_traits< _tChar >
::int_type 
ystdex::const_ntctscmp (const _tChar *s1, const _tChar *s2, size_t n)
 比较限制长度上限的简单 NTCTS 。 更多...
 
template<typename _tChar >
size_t ystdex::const_ntctschr (const _tChar *s, _tChar c)
 在简单 NTCTS 中顺序查找指定字符。 更多...
 
template<typename _tChar >
size_t ystdex::const_ntctschrn (const _tChar *s, _tChar c, size_t n)
 在简单 NTCTS 中顺序查找第指定次数出现的指定字符。 更多...
 
template<typename _tChar >
size_t ystdex::const_ntctsstr (const _tChar *s1, const _tChar *s2)
 在简单 NTCTS 中顺序查找作为子串的指定 NTCTS 。 更多...
 

详细描述

简单 NTCTS 操作。

注解
NTCTS(null-terminated character string) 即空字符标记结束的字符串, 除了结束字符外没有空字符。
简单指不包括 NTMBS(null-terminated mutibyte string) ,按等宽字符考虑。
参见
ISO C++03 (17.1.12, 17.3.2.1.3.2) 。

函数说明

template<typename _tChar >
size_t ystdex::const_ntctschr ( const _tChar *  s,
_tChar  c 
)
inline

在简单 NTCTS 中顺序查找指定字符。

返回
在查找结束时经过的字符数。
自从
build 329

在文件 cstring.h231 行定义.

参考 ystdex::is_null().

函数调用图:

template<typename _tChar >
size_t ystdex::const_ntctschrn ( const _tChar *  s,
_tChar  c,
size_t  n 
)
inline

在简单 NTCTS 中顺序查找第指定次数出现的指定字符。

返回
在查找结束时经过的字符数。
自从
build 329

在文件 cstring.h246 行定义.

参考 ystdex::is_null().

函数调用图:

template<typename _tChar >
std::char_traits<_tChar>::int_type ystdex::const_ntctscmp ( const _tChar *  s1,
const _tChar *  s2 
)
inline

比较简单 NTCTS 。

注解
语义同 std::basic_string<_tChar>::compare ,但忽略指定长度。
自从
build 329

在文件 cstring.h200 行定义.

参考 ystdex::is_null().

参考自 ystdex::const_ntctscmp() , 以及 ystdex::const_ntctsstr().

函数调用图:

这是这个函数的调用关系图:

template<typename _tChar >
std::char_traits<_tChar>::int_type ystdex::const_ntctscmp ( const _tChar *  s1,
const _tChar *  s2,
size_t  n 
)
inline

比较限制长度上限的简单 NTCTS 。

注解
语义同 std::basic_string<_tChar>::compare 。
自从
build 329

在文件 cstring.h215 行定义.

参考 ystdex::const_ntctscmp() , 以及 ystdex::is_null().

函数调用图:

template<typename _tChar >
size_t ystdex::const_ntctscnt ( const _tChar *  s,
_tChar  c 
)
inline

计算简单 NTCTS 中的指定字符数。

自从
build 329

在文件 cstring.h185 行定义.

参考 ystdex::is_null().

函数调用图:

template<typename _tChar >
size_t ystdex::const_ntctslen ( const _tChar *  s)
inline

计算简单 NTCTS 长度。

注解
语义同 std::char_traits<_tChar>::length 。
自从
build 329

在文件 cstring.h172 行定义.

参考 ystdex::is_null().

参考自 ystdex::const_ntctsstr().

函数调用图:

这是这个函数的调用关系图:

template<typename _tChar >
size_t ystdex::const_ntctsstr ( const _tChar *  s1,
const _tChar *  s2 
)
inline

在简单 NTCTS 中顺序查找作为子串的指定 NTCTS 。

返回
在查找结束时经过的字符数。
自从
build 329

在文件 cstring.h262 行定义.

参考 ystdex::const_ntctscmp(), ystdex::const_ntctslen() , 以及 ystdex::is_null().

函数调用图:

template<typename _tChar >
std::char_traits<_tChar>::int_type ystdex::ntctscmp ( const _tChar *  s1,
const _tChar *  s2 
)

按字典序比较简单 NTCTS 。

前置条件
断言: s1 && s2
注解
语义同 std::basic_string<_tChar>::compare ,但忽略指定长度。
自从
build 329

在文件 cstring.h129 行定义.

参考 ystdex::is_null(), yconstraint , 以及 yunseq.

函数调用图:

template<typename _tChar >
std::char_traits<_tChar>::int_type ystdex::ntctsicmp ( const _tChar *  s1,
const _tChar *  s2 
)

按字典序比较简单 NTCTS (忽略大小写)。

前置条件
断言: s1 && s2
注解
语义同 std::basic_string<_tChar>::compare ,但忽略指定长度和大小写。
自从
build 329

在文件 cstring.h150 行定义.

参考 ystdex::is_null(), yconstraint , 以及 yunseq.

函数调用图:

template<typename _tChar >
size_t ystdex::ntctslen ( const _tChar *  s)

计算简单 NTCTS 长度。

前置条件
断言: s
注解
语义同 std::char_traits<_tChar>::length 。
自从
build 329

在文件 cstring.h109 行定义.

参考 ystdex::is_null(), platform_ex::Windows::s , 以及 yconstraint.

参考自 platform_ex::Windows::MBCSToWCS(), CHRLib::strdup(), CHRLib::ucsdup(), platform_ex::Windows::UTF8ToMBCS() , 以及 platform_ex::Windows::WCSToMBCS().

函数调用图:

这是这个函数的调用关系图: