std::char_t...ts::assign,(3)
π std::char_traits::assign π
okay bestie, we're in the C++ Standard Libary section of the manual, and this page is all about std::char_traits::assign β the assignment bestie of character traits β¨ No cap, it's a short one, but we're still gonna give every deet its moment.
π NAME π
std::char_traits::assign,std::char_traits::assign, - std::char_traits::assign,std::char_traits::assign,
β¨ Synopsis β¨
Here's the whole signature situation, copied exactly so nobody comes for me:
std::char_traits<char32_t>::assign
static void assign( char_type& c1, const char_type& c2 (1)
(noexcept since C++11)
);
(constexpr since C++17)
static char_type* assign( char_type* ptr, std::size_t (2)
(constexpr since C++20)
count, char_type c2 );
1) Drops c2 into c1 β behavior is identical to c1 = c2, fr.
2) Drops c2 into each character in count characters in the character sequence pointed to by ptr. Like, every single one, bestie.
See CharTraits for the general requirements on character traits for X::assign.
πΈ Parameters πΈ
c1β the character to assign to.c2β the character value to assign.ptrβ pointer to a character sequence to assign to.countβ the length of the character sequence.
π«Ά Return value π«Ά
- 1)
(none)β literally no return value, just vibes. - 2)
ptrβ the same pointer comes back to you.
π₯ Complexity π₯
- 1) Constant.
- 2) Linear in
count.
Footer check, bestie: the source/version is http://cppreference.com, the date is 2024.06.10, and the footer label is std::char_t...ts::assign,(3). That's the whole sign-off, mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms