[string.view.modifiers]

# 27 Strings library [[strings]](./#strings)

## 27.3 String view classes [[string.view]](string.view#modifiers)

### 27.3.3 Class template basic_string_view [[string.view.template]](string.view.template#string.view.modifiers)

#### 27.3.3.7 Modifiers [string.view.modifiers]

[ð](#lib:remove_prefix,basic_string_view)

`constexpr void remove_prefix(size_type n);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1137)

*Hardened preconditions*: n <= size() is true[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1141)

*Effects*: Equivalent to: *data_* += n; *size_* -= n;

[ð](#lib:remove_suffix,basic_string_view)

`constexpr void remove_suffix(size_type n);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1152)

*Hardened preconditions*: n <= size() is true[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1156)

*Effects*: Equivalent to: *size_* -= n;

[ð](#lib:swap,basic_string_view)

`constexpr void swap(basic_string_view& s) noexcept;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1167)

*Effects*: Exchanges the values of *this and s[.](#5.sentence-1)
