Tags: #cpp19 #string_view
"std::string is the standard way of working with strings in C++, and offers a lot of convenient functionality for working with strings, such as comparison, searching for substrings, concatenating, slicing, etc."
https://skebanga.github.io/string-view/
"std::string is the standard way of working with strings in C++, and offers a lot of convenient functionality for working with strings, such as comparison, searching for substrings, concatenating, slicing, etc."
https://skebanga.github.io/string-view/
skebanga.github.io
C++17 string_view
Introduced under proposal n3921, string_view gives us the ability to refer to an existing string in a non-owning way.
Tags: #string #cpp17 #lambdas
http://playfulprogramming.blogspot.it/2016/08/strings-as-types-with-c17-constexpr.html
http://playfulprogramming.blogspot.it/2016/08/strings-as-types-with-c17-constexpr.html
playfulprogramming.blogspot.it
strings as types with c++17 constexpr lambdas
Recently I stumbled upon a question by @arne_mertz of Simplify C++ fame (if you don't read that blog, start now!) about using string lite...
Tags: #stackoverflow #string
http://stackoverflow.com/questions/40592298/why-would-you-compare-a-with-0x41
http://stackoverflow.com/questions/40592298/why-would-you-compare-a-with-0x41
Stackoverflow
Why would you compare 'A' with 0x41?
I was looking at some C++ code and found the following construct:
if('A' == 0x41) {
// ...
} else if('A' == 0xc1) {
// ...
} else {
// ...
}
I get a Visual Studio warning saying:
Warning...
if('A' == 0x41) {
// ...
} else if('A' == 0xc1) {
// ...
} else {
// ...
}
I get a Visual Studio warning saying:
Warning...
Tags: #string #view #cpp17
"Technically, basic_string_view is an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero."
https://marcoarena.wordpress.com/2017/01/03/string_view-odi-et-amo/
"Technically, basic_string_view is an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero."
https://marcoarena.wordpress.com/2017/01/03/string_view-odi-et-amo/
Growing up
string_view odi et amo
string_view-like wrappers have been successfully used in C++ codebases for years, made possible by libraries like boost::string_ref. I think all of you know that string_view has joined the C++ stan…
How to split a string
#String #Manipulation
https://www.fluentcpp.com/2017/04/21/how-to-split-a-string-in-c/
#String #Manipulation
https://www.fluentcpp.com/2017/04/21/how-to-split-a-string-in-c/