Files
2025-10-25 03:02:53 +03:00

45 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[string.substr]
# 27 Strings library [[strings]](./#strings)
## 27.4 String classes [[string.classes]](string.classes#string.substr)
### 27.4.3 Class template basic_string [[basic.string]](basic.string#string.substr)
#### 27.4.3.8 String operations [[string.ops]](string.ops#string.substr)
#### 27.4.3.8.3 basic_string::substr [string.substr]
[🔗](#lib:substr,basic_string)
`constexpr basic_string substr(size_type pos = 0, size_type n = npos) const &;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4463)
*Effects*: Equivalent to: return basic_string(*this, pos, n);
[🔗](#lib:substr,basic_string_)
`constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4474)
*Effects*: Equivalent to: return basic_string(std::move(*this), pos, n);
[🔗](#lib:subview,basic_string)
`constexpr basic_string_view<charT, traits> subview(size_type pos = 0, size_type n = npos) const;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L4485)
*Effects*: Equivalent to: return basic_string_view<charT, traits>(*this).subview(pos, n);