---
name: "std::experimental::filesystem::basic_string_view"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::experimental::filesystem::basic_string_view"
---

# std::experimental::filesystem::basic\_string\_view(3)

A non-owning reference to a string.

## NAME

std::experimental::filesystem::basic\_string\_view\< \_CharT, \_Traits \> - A non-owning reference to a string.

## SYNOPSIS

\#include \<\>\>

### Public Types

using **const\_iterator**\
 using **const\_pointer**\
 using **const\_reference**\
 using **const\_reverse\_iterator**\
 using **difference\_type**\
 using **iterator**\
 using **pointer**\
 using **reference**\
 using **reverse\_iterator**\
 using **size\_type**\
 using **traits\_type**\
 using **value\_type**\

### Public Member Functions

template\<contiguous\_iterator \_It, sized\_sentinel\_for\< \_It \> \_End\> constexpr **basic\_string\_view** (\_It \_\_first, \_End \_\_last) noexcept(noexcept(\_\_last - \_\_first))\
 template\<typename \_Range, typename \_DRange = remove\_cvref\_t\<\_Range\>\> constexpr **basic\_string\_view** (\_Range &&\_\_r) noexcept(noexcept(ranges::size(\_\_r)) &&noexcept(ranges::data(\_\_r)))\
 constexpr **basic\_string\_view** (const \_CharT \*\_\_str) noexcept\
 constexpr **basic\_string\_view** (const \_CharT \*\_\_str, size\_type \_\_len) noexcept\
 constexpr **basic\_string\_view** (const basic\_string\_view &) noexcept=default\
 **basic\_string\_view** (nullptr\_t)=delete\
 constexpr const\_reference **at** (size\_type \_\_pos) const\
 constexpr const\_reference **back** () const noexcept\
 constexpr const\_iterator **begin** () const noexcept\
 constexpr const\_iterator **cbegin** () const noexcept\
 constexpr const\_iterator **cend** () const noexcept\
 constexpr int **compare** (basic\_string\_view \_\_str) const noexcept\
 constexpr int **compare** (const \_CharT \*\_\_str) const noexcept\
 constexpr int **compare** (size\_type \_\_pos1, size\_type \_\_n1, basic\_string\_view \_\_str) const\
 constexpr int **compare** (size\_type \_\_pos1, size\_type \_\_n1, basic\_string\_view \_\_str, size\_type \_\_pos2, size\_type \_\_n2) const\
 constexpr int **compare** (size\_type \_\_pos1, size\_type \_\_n1, const \_CharT \*\_\_str) const\
 constexpr int **compare** (size\_type \_\_pos1, size\_type \_\_n1, const \_CharT \*\_\_str, size\_type \_\_n2) const noexcept(false)\
 constexpr bool **contains** (\_CharT \_\_x) const noexcept\
 constexpr bool **contains** (basic\_string\_view \_\_x) const noexcept\
 constexpr bool **contains** (const \_CharT \*\_\_x) const noexcept\
 constexpr size\_type **copy** (\_CharT \*\_\_str, size\_type \_\_n, size\_type \_\_pos=0) const\
 constexpr const\_reverse\_iterator **crbegin** () const noexcept\
 constexpr const\_reverse\_iterator **crend** () const noexcept\
 constexpr const\_pointer **data** () const noexcept\
 constexpr bool **empty** () const noexcept\
 constexpr const\_iterator **end** () const noexcept\
 constexpr size\_type **find** (\_CharT \_\_c, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find** (basic\_string\_view \_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **find** (const \_CharT \*\_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_not\_of** (\_CharT \_\_c, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_not\_of** (basic\_string\_view \_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_not\_of** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **find\_first\_not\_of** (const \_CharT \*\_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_of** (\_CharT \_\_c, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_of** (basic\_string\_view \_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_first\_of** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **find\_first\_of** (const \_CharT \*\_\_str, size\_type \_\_pos=0) const noexcept\
 constexpr size\_type **find\_last\_not\_of** (\_CharT \_\_c, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **find\_last\_not\_of** (basic\_string\_view \_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **find\_last\_not\_of** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **find\_last\_not\_of** (const \_CharT \*\_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **find\_last\_of** (\_CharT \_\_c, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **find\_last\_of** (basic\_string\_view \_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **find\_last\_of** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **find\_last\_of** (const \_CharT \*\_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr const\_reference **front** () const noexcept\
 constexpr size\_type **length** () const noexcept\
 constexpr size\_type **max\_size** () const noexcept\
 constexpr basic\_string\_view & **operator=** (const basic\_string\_view &) noexcept=default\
 constexpr const\_reference **operator\[\]** (size\_type \_\_pos) const noexcept\
 constexpr const\_reverse\_iterator **rbegin** () const noexcept\
 constexpr void **remove\_prefix** (size\_type \_\_n) noexcept\
 constexpr void **remove\_suffix** (size\_type \_\_n) noexcept\
 constexpr const\_reverse\_iterator **rend** () const noexcept\
 constexpr size\_type **rfind** (\_CharT \_\_c, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **rfind** (basic\_string\_view \_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **rfind** (const \_CharT \*\_\_str, size\_type \_\_pos, size\_type \_\_n) const noexcept\
 constexpr size\_type **rfind** (const \_CharT \*\_\_str, size\_type \_\_pos=npos) const noexcept\
 constexpr size\_type **size** () const noexcept\
 constexpr basic\_string\_view **substr** (size\_type \_\_pos=0, size\_type \_\_n=npos) const noexcept(false)\
 constexpr basic\_string\_view **subview** (size\_type \_\_pos=0, size\_type \_\_n=npos) const\
 constexpr void **swap** (basic\_string\_view &\_\_sv) noexcept\

### Static Public Attributes

static constexpr size\_type **npos**\

## Detailed Description

### template\<typename \_CharT, typename \_Traits = std::char\_traits\<\_CharT\>\>

class std::experimental::filesystem::basic\_string\_view\< \_CharT, \_Traits \>"A non-owning reference to a string.

**Template Parameters**

*\_CharT* Type of character \
 *\_Traits* Traits for character type, defaults to char\_traits\<\_CharT\>.

A basic\_string\_view looks like this:

```
_CharT*    _M_str
size_t     _M_len
```

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
