Skip to content

Glossary: Data Structures and Algorithms in C++

std::string_view

Also written: string_view

A window onto another string's characters with no copying, so its substr is O(1). It prints garbage if the original string dies or changes.

Where the book teaches it

Related terms

Slice