27 Strings library [strings]

27.4 String classes [string.classes]

27.4.3 Class template basic_string [basic.string]

27.4.3.8 String operations [string.ops]

27.4.3.8.3 basic_string​::​substr [string.substr]

constexpr basic_string substr(size_type pos = 0, size_type n = npos) const &;
Effects: Equivalent to: return basic_string(*this, pos, n);
constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&;
Effects: Equivalent to: return basic_string(std​::​move(*this), pos, n);