About 4,570 results
Open links in new tab
  1. std::basic_string<CharT,Traits,Allocator>::substr - cppreference.net

    Apr 12, 2024 · Possible output: abcdefghij 567 hij basic_string::substr: __pos (which is 23) > this->size() (which is 20)

  2. std::basic_string_view<CharT,Traits>::substr - cppreference.net

    Possible output: ABCDEF BCDEF CDE EF basic_string_view::substr: __pos (which is 666) > __size (which is 6)

  3. std::experimental::basic_string_view<CharT,Traits>:: substr

    basic_string_view::substr basic_string_view::compare basic_string_view::find basic_string_view::rfind basic_string_view::find_first_of basic_string_view::find_last_of basic_string_view::find_first_not_of …

  4. std::basic_string - cppreference.net

    Apr 27, 2025 · str1 = str3. substr(pos + 1); // the part after the space str2 = str3. substr(0, pos); // the part till the space std::cout << str1 << ' ' << str2 << '\n'; // Accessing an element using subscript operator[] …

  5. Strings library - cppreference.net

    Jan 28, 2025 · Characters In the C++ standard library, a character is an object which, when treated sequentially, can represent text. The term means not only objects of character types , but also any …

  6. std::basic_string_view - cppreference.net

    Mar 27, 2025 · The class template basic_string_view describes an object that can refer to a constant contiguous sequence of CharT with the first element of the sequence at position zero. For a …

  7. C++23 - cppreference.net

    Mar 27, 2025 · Rvalue reference overload of std :: basic_string :: substr for efficient slicing ( P2438R2 ) Formatting ranges, tuples, escaped presentation of characters and strings, std:: thread :: id , and …

  8. std::basic_string<CharT,Traits,Allocator>:: - cppreference.net

    Jun 1, 2023 · 1) A string view sv (which may be a result of implicit conversion from another std::basic_string ).

  9. std::basic_string_view<CharT,Traits>:: operator= - cppreference.net

    Example Run this code #include <iostream>#include <string_view>int main (){std::string_view v ="Hello, world"; v = v. substr(7);std::cout<< v <<'\n';} Output: world

  10. Standard library header <string_view> (C++17) - cppreference.net

    Nov 27, 2023 · namespace std { template<class CharT, class Traits = char_traits <CharT>> class basic_string_view { public: // types using Traits_type = Traits; using value_type = CharT; using …