Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::BasicPartitionResult< CharT, Traits, Allocator > Struct Template Reference

字符串分区结果,包含左部分、分隔符、右部分。 More...

#include <strpp.h>

Public Types

using string_type = std::basic_string<CharT, Traits, Allocator>

Public Attributes

string_type left
 分隔符前的子串
string_type middle
 分隔符本身
string_type right
 分隔符后的子串

Friends

std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const BasicPartitionResult &pr)
 输出分区结果到流,格式为 ("left", "middle", "right")。

Detailed Description

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
struct console::BasicPartitionResult< CharT, Traits, Allocator >

字符串分区结果,包含左部分、分隔符、右部分。

Template Parameters
CharT字符类型。
Traits字符特征类型。
Allocator内存分配器类型。

Member Typedef Documentation

◆ string_type

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
using console::BasicPartitionResult< CharT, Traits, Allocator >::string_type = std::basic_string<CharT, Traits, Allocator>

◆ operator<<

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
std::basic_ostream< CharT, Traits > & operator<< ( std::basic_ostream< CharT, Traits > & os,
const BasicPartitionResult< CharT, Traits, Allocator > & pr )
friend

输出分区结果到流,格式为 ("left", "middle", "right")。

Parameters
os输出流。
pr分区结果对象。
Returns
std::basic_ostream<CharT, Traits>& 流引用。

Member Data Documentation

◆ left

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
string_type console::BasicPartitionResult< CharT, Traits, Allocator >::left

分隔符前的子串

◆ middle

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
string_type console::BasicPartitionResult< CharT, Traits, Allocator >::middle

分隔符本身

◆ right

template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
string_type console::BasicPartitionResult< CharT, Traits, Allocator >::right

分隔符后的子串


The documentation for this struct was generated from the following file: