YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
ISO C++ 标准字符串扩展。 更多...
类 | |
struct | ystdex::string_traits< _tString > |
字符串特征。 更多... | |
命名空间 | |
ystdex | |
ystdex::details | |
类型定义 | |
template<typename _tParam , typename = decltype(std::declval<_tParam>()[0])> | |
using | ystdex::enable_for_string_class_t = enable_if_t< is_class< decay_t< _tParam >>::value, int > |
选择字符串类类型的特定重载避免和其它非字符串类型冲突。 更多... | |
函数 | |
template<typename _tChar > | |
size_t | ystdex::string_length (const _tChar *str) |
计算字符串长度。 更多... | |
template<class _tString , typename = enable_if_t<is_class<_tString>::value, int>> | |
size_t | ystdex::string_length (const _tString &str) |
template<typename _tFwd1 , typename _tFwd2 , typename _fPred > | |
bool | ystdex::details::ends_with_iter_dispatch (_tFwd1 b, _tFwd1 e, _tFwd2 bt, _tFwd2 et, _fPred comp, std::bidirectional_iterator_tag) |
template<class _tString > | |
_tString | ystdex::alph (_tString &str) |
取字母表:有序的字符串的不重复序列。 更多... | |
template<class _tString > | |
void | ystdex::concat (_tString &str, size_t n) |
重复串接。 更多... | |
template<typename _fPred , typename _fInsert , typename _tIn > | |
void | ystdex::split (_tIn b, _tIn e, _fPred is_delim, _fInsert insert) |
以指定字符分割字符序列。 更多... | |
template<typename _fPred , typename _fInsert , typename _tRange > | |
void | ystdex::split (_tRange &&c, _fPred is_delim, _fInsert insert) |
以指定字符分割范围指定的字符串。 更多... | |
template<typename _fPred , typename _fInsert , typename _tIn > | |
_tIn | ystdex::split_l (_tIn b, _tIn e, _fPred is_delim, _fInsert insert) |
以指定字符分割字符序列。 更多... | |
template<typename _fPred , typename _fInsert , typename _tRange > | |
void | ystdex::split_l (_tRange &&c, _fPred is_delim, _fInsert insert) |
以指定字符分割范围指定的字符串。 更多... | |
template<typename _tChar > | |
std::basic_string< _tChar > | ystdex::vsfmt (const _tChar *fmt, std::va_list args) |
以 C 标准输出格式的输出 std::basic_string 实例的对象。 更多... | |
template<typename _tChar > | |
std::basic_string< _tChar > | ystdex::sfmt (const _tChar *fmt,...) |
以 C 标准输出格式的输出 std::basic_string 实例的对象。 更多... | |
template std::string | ystdex::sfmt< char > (const char *,...) |
显式实例化:以 C 标准输出格式的输出 std::string 对象。 更多... | |
template<typename _tRange1 , typename _tRange2 , typename _fPred > | |
bool | ystdex::starts_width (const _tRange1 &input, const _tRange2 &test, _fPred comp) |
判断第一个参数指定的串是否以第二个参数起始。 更多... | |
template<typename _tRange1 , typename _tRange2 > | |
bool | ystdex::starts_width (const _tRange1 &input, const _tRange2 &test) |
template<typename _tRange1 , typename _tRange2 , typename _fPred > | |
bool | ystdex::ends_with (const _tRange1 &input, const _tRange2 &test, _fPred comp) |
判断第一个参数指定的串是否以第二个参数结束。 更多... | |
template<typename _tRange1 , typename _tRange2 > | |
bool | ystdex::ends_with (const _tRange1 &input, const _tRange2 &test) |
template<class _tString > | |
_tString && | ystdex::ltrim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
删除字符串中指定的连续前缀字符。 更多... | |
template<class _tString > | |
_tString && | ystdex::rtrim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
删除字符串中指定的连续后缀字符。 更多... | |
template<class _tString > | |
_tString && | ystdex::trim (_tString &&str, typename string_traits< _tString >::const_pointer t=&to_array< typename string_traits< _tString >::value_type >("\n\r\t\v ")[0]) |
删除字符串中指定的连续前缀与后缀字符。 更多... | |
template<typename _tString > | |
_tString | ystdex::get_mid (const _tString &str, typename _tString::size_type l=1) |
取删除前缀和后缀的子字符串。 更多... | |
template<typename _tString > | |
_tString | ystdex::get_mid (const _tString &str, typename _tString::size_type l, typename _tString::size_type r) |
std::string | ystdex::to_string (unsigned char val) |
转换为字符串。 更多... | |
std::string | ystdex::to_string (unsigned short val) |
template<typename _type > | |
std::string | ystdex::to_string (_type val, enable_if_t< is_enum< _type >::value, int >=0) |
ISO C++ 标准字符串扩展。
在文件 string.hpp 中定义.