C++ Standard Library C++ STL Library

C++ - <string_view>



C++ <string_view>

A string_view object is designed to hold an array of values. It supports element-wise mathematical operations and various forms of generalized subscript operators, slicing and indirect access. Most of the mathematical operations can be directly applied to string_view objects, including arithmetical and comparison operators, affecting all its elements.

Syntax

template <class T> class string_view;

Parameters

T Type of the elements stored in the string_view.

Member Types

Member typesDefinition
value_type T (First template parameter)

C++ <string_view> - Member Functions

The C++ string_view has a number of member functions which are listed below: