René's URL Explorer Experiment


Title: Passing Strings To Functions C++ | hacking C++

Open Graph Title: Passing Strings To Functions C++

X Title: Passing Strings To Functions C++

Description: 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.

Open Graph Description: 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.

X Description: 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.

Opengraph URL: https://hackingcpp.com/cpp/recipe/string_parameters.html

X: @hackingcpp

direct link

Domain: hackingcpp.com

None86400
authorAndré Müller
date2023-03-22
copyright2019-2023 André Müller
theme-color#0070C0
og:imagehttps://hackingcpp.com/cpp/recipe/string_parameters_card.png
og:site_namehacking C++
og:localeen_US
og:typearticle
twitter:cardsummary_large_image
twitter:imagehttps://hackingcpp.com/cpp/recipe/string_parameters_card.png
twitter:creator@hackingcpp
hcpp-page-categorycat-recipe
hcpp-tagsC++ C++11 C++14 C++17 C++98 STL beginner-level modern-C++ recipe std-library

Links:

https://hackingcpp.com/cpp/recipe/index.html
hacking C++https://hackingcpp.com/cpp/recipe/index.html
Newshttps://hackingcpp.com/cpp/recipe/tags/news.html
Beginner's Guide to C++https://hackingcpp.com/cpp/recipe/cpp/beginners_guide.html
Standard Library Containershttps://hackingcpp.com/cpp/recipe/cpp/std/containers.html
Standard Library Algorithmshttps://hackingcpp.com/cpp/recipe/cpp/std/algorithms.html
Cheat Sheets / Infographicshttps://hackingcpp.com/cpp/recipe/cpp/cheat_sheets.html
All Recipeshttps://hackingcpp.com/cpp/recipe/tags/recipe.html
All Articleshttps://hackingcpp.com/cpp/recipe/tags/article.html
Online Learninghttps://hackingcpp.com/cpp/recipe/dev/web_learning.html
Educational Videoshttps://hackingcpp.com/cpp/recipe/cpp/educational_videos.html
Bookshttps://hackingcpp.com/cpp/recipe/cpp/books.html
Community Resourceshttps://hackingcpp.com/cpp/recipe/cpp/community.html
Tools Ecosystemhttps://hackingcpp.com/cpp/recipe/cpp/tools/ecosystem.html
All Resource Listshttps://hackingcpp.com/cpp/recipe/tags/list.html
VIM Pluginshttps://hackingcpp.com/cpp/recipe/dev/vim_plugins.html
Why & Whohttps://hackingcpp.com/cpp/recipe/about.html
Privacyhttps://hackingcpp.com/cpp/recipe/privacy.html
https://twitter.com/hackingcpp
Newshttps://hackingcpp.com/cpp/recipe/tags/news.html
Articleshttps://hackingcpp.com/cpp/recipe/tags/article.html
Recipeshttps://hackingcpp.com/cpp/recipe/tags/recipe.html
Beginner's Guide to C++https://hackingcpp.com/cpp/recipe/cpp/beginners_guide.html
Listshttps://hackingcpp.com/cpp/recipe/tags/list.html
@hackingcpphttps://twitter.com/hackingcpp
RSS Feedhttps://hackingcpp.com/feed.rss
Abouthttps://hackingcpp.com/cpp/recipe/about.html
Privacyhttps://hackingcpp.com/cpp/recipe/privacy.html
Homehttps://hackingcpp.com/cpp/recipe/index.html
C++17https://hackingcpp.com/cpp/recipe/tags/c++17.html
C++17https://hackingcpp.com/cpp/recipe/tags/c++17.html
Strings (Basics)https://hackingcpp.com/cpp/recipe/cpp/std/string_basics.html
Standard Library Sequence Viewshttps://hackingcpp.com/cpp/recipe/cpp/std/sequence_views.html
Referenceshttps://hackingcpp.com/cpp/recipe/cpp/lang/references.html
Move Semanticshttps://hackingcpp.com/cpp/recipe/cpp/lang/move_semantics.html
cppreference: std::string_viewhttps://en.cppreference.com/w/cpp/string/basic_string_view
cppreference: Standard String Libraryhttps://en.cppreference.com/w/cpp/string
C++ Weekly: string_viewhttps://youtu.be/fj_CF8xK760
string_view is a borrow type (by Arthur O’Dwyer)https://quuxplusone.github.io/blog/2018/03/27/string-view-is-a-borrow-type
C++https://hackingcpp.com/cpp/recipe/tags/c++.html
C++11https://hackingcpp.com/cpp/recipe/tags/c++11.html
C++14https://hackingcpp.com/cpp/recipe/tags/c++14.html
C++17https://hackingcpp.com/cpp/recipe/tags/c++17.html
C++98https://hackingcpp.com/cpp/recipe/tags/c++98.html
STLhttps://hackingcpp.com/cpp/recipe/tags/stl.html
beginner-levelhttps://hackingcpp.com/cpp/recipe/tags/beginner-level.html
modern-C++https://hackingcpp.com/cpp/recipe/tags/modern-c++.html
recipehttps://hackingcpp.com/cpp/recipe/tags/recipe.html
std-libraryhttps://hackingcpp.com/cpp/recipe/tags/std-library.html
https://twitter.com/share?url=https://hackingcpp.com/cpp/recipe/string_parameters.html
http://www.reddit.com/submit?url=https://hackingcpp.com/cpp/recipe/string_parameters.html
https://www.facebook.com/sharer/sharer.php?u=https://hackingcpp.com/cpp/recipe/string_parameters.html
https://www.linkedin.com/sharing/share-offsite/?url=https://hackingcpp.com/cpp/recipe/string_parameters.html
Homehttps://hackingcpp.com/cpp/recipe/index.html
Newshttps://hackingcpp.com/cpp/recipe/tags/news.html
Articleshttps://hackingcpp.com/cpp/recipe/tags/article.html
Recipeshttps://hackingcpp.com/cpp/recipe/tags/recipe.html
Guideshttps://hackingcpp.com/cpp/recipe/tags/guide.html
Listshttps://hackingcpp.com/cpp/recipe/tags/list.html
Abouthttps://hackingcpp.com/cpp/recipe/about.html
Privacyhttps://hackingcpp.com/cpp/recipe/privacy.html
Twitterhttps://twitter.com/hackingcpp
RSS Feedhttps://hackingcpp.com/feed.rss
 https://optunum.com
Tagshttps://hackingcpp.com/cpp/recipe/tags.html
algorithmshttps://hackingcpp.com/cpp/recipe/tags/algorithms.html
allocatorshttps://hackingcpp.com/cpp/recipe/tags/allocators.html
arrayshttps://hackingcpp.com/cpp/recipe/tags/arrays.html
articlehttps://hackingcpp.com/cpp/recipe/tags/article.html
beginner-levelhttps://hackingcpp.com/cpp/recipe/tags/beginner-level.html
blogshttps://hackingcpp.com/cpp/recipe/tags/blogs.html
bookshttps://hackingcpp.com/cpp/recipe/tags/books.html
build-systemshttps://hackingcpp.com/cpp/recipe/tags/build-systems.html
C++https://hackingcpp.com/cpp/recipe/tags/c++.html
C++-standardizationhttps://hackingcpp.com/cpp/recipe/tags/c++-standardization.html
C++11https://hackingcpp.com/cpp/recipe/tags/c++11.html
C++14https://hackingcpp.com/cpp/recipe/tags/c++14.html
C++17https://hackingcpp.com/cpp/recipe/tags/c++17.html
C++20https://hackingcpp.com/cpp/recipe/tags/c++20.html
C++23https://hackingcpp.com/cpp/recipe/tags/c++23.html
C++98https://hackingcpp.com/cpp/recipe/tags/c++98.html
C-stylehttps://hackingcpp.com/cpp/recipe/tags/c-style.html
C-vs-C++https://hackingcpp.com/cpp/recipe/tags/c-vs-c++.html
castshttps://hackingcpp.com/cpp/recipe/tags/casts.html
classeshttps://hackingcpp.com/cpp/recipe/tags/classes.html
code-editorshttps://hackingcpp.com/cpp/recipe/tags/code-editors.html
code-formattinghttps://hackingcpp.com/cpp/recipe/tags/code-formatting.html
command-linehttps://hackingcpp.com/cpp/recipe/tags/command-line.html
communityhttps://hackingcpp.com/cpp/recipe/tags/community.html
comparisonshttps://hackingcpp.com/cpp/recipe/tags/comparisons.html
compilershttps://hackingcpp.com/cpp/recipe/tags/compilers.html
conceptshttps://hackingcpp.com/cpp/recipe/tags/concepts.html
conferenceshttps://hackingcpp.com/cpp/recipe/tags/conferences.html
consthttps://hackingcpp.com/cpp/recipe/tags/const.html
constexprhttps://hackingcpp.com/cpp/recipe/tags/constexpr.html
containershttps://hackingcpp.com/cpp/recipe/tags/containers.html
control-flowhttps://hackingcpp.com/cpp/recipe/tags/control-flow.html
CUDAhttps://hackingcpp.com/cpp/recipe/tags/cuda.html
custom-typeshttps://hackingcpp.com/cpp/recipe/tags/custom-types.html
data-structureshttps://hackingcpp.com/cpp/recipe/tags/data-structures.html
debugginghttps://hackingcpp.com/cpp/recipe/tags/debugging.html
designhttps://hackingcpp.com/cpp/recipe/tags/design.html
diagnosticshttps://hackingcpp.com/cpp/recipe/tags/diagnostics.html
exceptionshttps://hackingcpp.com/cpp/recipe/tags/exceptions.html
file-iohttps://hackingcpp.com/cpp/recipe/tags/file-io.html
findhttps://hackingcpp.com/cpp/recipe/tags/find.html
functional-proghttps://hackingcpp.com/cpp/recipe/tags/functional-prog.html
functionshttps://hackingcpp.com/cpp/recipe/tags/functions.html
galleryhttps://hackingcpp.com/cpp/recipe/tags/gallery.html
generic-proghttps://hackingcpp.com/cpp/recipe/tags/generic-prog.html
groupshttps://hackingcpp.com/cpp/recipe/tags/groups.html
guidehttps://hackingcpp.com/cpp/recipe/tags/guide.html
guidelineshttps://hackingcpp.com/cpp/recipe/tags/guidelines.html
hash-maphttps://hackingcpp.com/cpp/recipe/tags/hash-map.html
hash-sethttps://hackingcpp.com/cpp/recipe/tags/hash-set.html
hashinghttps://hackingcpp.com/cpp/recipe/tags/hashing.html
header-fileshttps://hackingcpp.com/cpp/recipe/tags/header-files.html
heaphttps://hackingcpp.com/cpp/recipe/tags/heap.html
ideshttps://hackingcpp.com/cpp/recipe/tags/ides.html
idiomhttps://hackingcpp.com/cpp/recipe/tags/idiom.html
initializationhttps://hackingcpp.com/cpp/recipe/tags/initialization.html
inputhttps://hackingcpp.com/cpp/recipe/tags/input.html
iohttps://hackingcpp.com/cpp/recipe/tags/io.html
iostreamshttps://hackingcpp.com/cpp/recipe/tags/iostreams.html
iteratorshttps://hackingcpp.com/cpp/recipe/tags/iterators.html
lambdahttps://hackingcpp.com/cpp/recipe/tags/lambda.html
language-mechanismhttps://hackingcpp.com/cpp/recipe/tags/language-mechanism.html
language-referenceshttps://hackingcpp.com/cpp/recipe/tags/language-references.html
learninghttps://hackingcpp.com/cpp/recipe/tags/learning.html
librarieshttps://hackingcpp.com/cpp/recipe/tags/libraries.html
linkerhttps://hackingcpp.com/cpp/recipe/tags/linker.html
listhttps://hackingcpp.com/cpp/recipe/tags/list.html
low-levelhttps://hackingcpp.com/cpp/recipe/tags/low-level.html
maphttps://hackingcpp.com/cpp/recipe/tags/map.html
memoryhttps://hackingcpp.com/cpp/recipe/tags/memory.html
modern-C++https://hackingcpp.com/cpp/recipe/tags/modern-c++.html
move-semanticshttps://hackingcpp.com/cpp/recipe/tags/move-semantics.html
newshttps://hackingcpp.com/cpp/recipe/tags/news.html
oophttps://hackingcpp.com/cpp/recipe/tags/oop.html
organizationshttps://hackingcpp.com/cpp/recipe/tags/organizations.html
outputhttps://hackingcpp.com/cpp/recipe/tags/output.html
package-managerhttps://hackingcpp.com/cpp/recipe/tags/package-manager.html
paradigmhttps://hackingcpp.com/cpp/recipe/tags/paradigm.html
patternhttps://hackingcpp.com/cpp/recipe/tags/pattern.html
peoplehttps://hackingcpp.com/cpp/recipe/tags/people.html
performancehttps://hackingcpp.com/cpp/recipe/tags/performance.html
podcastshttps://hackingcpp.com/cpp/recipe/tags/podcasts.html
pointershttps://hackingcpp.com/cpp/recipe/tags/pointers.html
preprocessorhttps://hackingcpp.com/cpp/recipe/tags/preprocessor.html
profilinghttps://hackingcpp.com/cpp/recipe/tags/profiling.html
Pythonhttps://hackingcpp.com/cpp/recipe/tags/python.html
randomnesshttps://hackingcpp.com/cpp/recipe/tags/randomness.html
rangeshttps://hackingcpp.com/cpp/recipe/tags/ranges.html
recipehttps://hackingcpp.com/cpp/recipe/tags/recipe.html
referenceshttps://hackingcpp.com/cpp/recipe/tags/references.html
sethttps://hackingcpp.com/cpp/recipe/tags/set.html
social-mediahttps://hackingcpp.com/cpp/recipe/tags/social-media.html
stackhttps://hackingcpp.com/cpp/recipe/tags/stack.html
standardizationhttps://hackingcpp.com/cpp/recipe/tags/standardization.html
std-algorithmshttps://hackingcpp.com/cpp/recipe/tags/std-algorithms.html
std-containershttps://hackingcpp.com/cpp/recipe/tags/std-containers.html
std-libraryhttps://hackingcpp.com/cpp/recipe/tags/std-library.html
std-macroshttps://hackingcpp.com/cpp/recipe/tags/std-macros.html
std-vectorhttps://hackingcpp.com/cpp/recipe/tags/std-vector.html
STLhttps://hackingcpp.com/cpp/recipe/tags/stl.html
stringshttps://hackingcpp.com/cpp/recipe/tags/strings.html
stylehttps://hackingcpp.com/cpp/recipe/tags/style.html
tastehttps://hackingcpp.com/cpp/recipe/tags/taste.html
templateshttps://hackingcpp.com/cpp/recipe/tags/templates.html
testinghttps://hackingcpp.com/cpp/recipe/tags/testing.html
toolchainhttps://hackingcpp.com/cpp/recipe/tags/toolchain.html
toolshttps://hackingcpp.com/cpp/recipe/tags/tools.html
traversalhttps://hackingcpp.com/cpp/recipe/tags/traversal.html
typeshttps://hackingcpp.com/cpp/recipe/tags/types.html
userhttps://hackingcpp.com/cpp/recipe/tags/user.html
version-controlhttps://hackingcpp.com/cpp/recipe/tags/version-control.html
viewshttps://hackingcpp.com/cpp/recipe/tags/views.html
VIMhttps://hackingcpp.com/cpp/recipe/tags/vim.html
VIM-pluginshttps://hackingcpp.com/cpp/recipe/tags/vim-plugins.html
warningshttps://hackingcpp.com/cpp/recipe/tags/warnings.html
websiteshttps://hackingcpp.com/cpp/recipe/tags/websites.html

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.