Which function parameter types should be used for taking strings? Four different scenarios are shwon: 1) read-only access in C++17, 2) read-only access in C++98 to C++14, 3) when a copy of the input string is always needed inside the function, 4) in-place modification of the input string.
Passing Strings To Functions C++ | hacking C++
Which function parameter types should be used for taking strings? Four different scenarios are shwon: 1) read-only access in C++17, 2) read-only access in C++98 to C++14, 3) when a copy of the input string is always needed inside the function, 4) in-place modification of the input string.
https://hackingcpp.com/cpp/recipe/string_parameters.html