std::char_traits::assign

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)

Assigns a character.

1) Assigns character a to character r.
2) Assigns character a to each character in count characters in the character sequence pointed to by p.

Parameters

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

Return value

1) (none)
2) p

Exceptions

1)
(none) (until C++11)
noexcept specification:
noexcept
(since C++11)
2) (none)

Complexity

1) Constant.
2) Linear in count

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/string/char_traits/assign

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部