public static member function
<string>
std::char_traits::movestatic char_type* move (char_type* dest, const char_type* src, size_t n);
Move character sequence
Copies the sequence of n characters pointed by src to the array pointed by dest, even if the ranges overlap.All character traits types shall implement the function as if the individual characters were assigned using member assign.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// char_traits::move
#include <iostream> // std::cout
#include <string> // std::char_traits
int main ()
{
char foo[] = "---o............";
std::cout << foo << '\n';
std::char_traits<char>::move (foo+3,foo,4);
std::cout << foo << '\n';
std::char_traits<char>::move (foo+6,foo,7);
std::cout << foo << '\n';
return 0;
}
---o............ ------o......... ------------o...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4