YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
YCLib ISO C++ 标准字符串扩展。 更多...
类 | |
struct | ystdex::string_traits< _tString > |
字符串特征。 更多... | |
命名空间 | |
namespace | ystdex |
函数 | |
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 _fPred , typename _fInsert , typename _tIn > | |
_tIn | 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 _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 _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, typename std::enable_if< std::is_enum< _type >::value, int >::type=0) |
YCLib ISO C++ 标准字符串扩展。
在文件 string.hpp 中定义.