Home | History | Annotate | Download | only in string.view.ops

Lines Matching refs:sv2

101     constexpr std::string_view sv2 = sv1.substr ( 0, 3 );
102 static_assert ( sv2.size() == 3, "" );
103 static_assert ( sv2[0] == 'A', "" );
104 static_assert ( sv2[1] == 'B', "" );
105 static_assert ( sv2[2] == 'C', "" );
109 constexpr std::string_view sv2 = sv1.substr ( 3, 0 );
110 static_assert ( sv2.size() == 0, "" );
114 constexpr std::string_view sv2 = sv1.substr ( 3, 3 );
115 static_assert ( sv2.size() == 2, "" );
116 static_assert ( sv2[0] == 'D', "" );
117 static_assert ( sv2[1] == 'E', "" );