首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::char_traits::assign

(1)

static void assign( char_type& r, const char_type& a );

(until C++17)

static constexpr void assign( char_type& r, const char_type& a );

(since C++17)

static char_type* assign( char_type* p, std::size_t count, char_type a );

(2)

指派一个角色。

1%29分配字符a对性格r...

2%29分配字符a中的每个字符count所指向的字符序列中的字符。p...

参数

a

-

character value to assign

r

-

character to assign to

p

-

pointer to a character sequence to assign to

count

-

the length of the character sequence

返回值

1%29%280%29

2%29p

例外

1%29

(none)

(until C++11)

noexcept specification: noexcept

(since C++11)

2%29%280%29

复杂性

1%29常数。

2%29线性count

代码语言:txt
复制
 © cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券