Skip to content

substr() throws if pos == size #3

@AdmiralCurtiss

Description

@AdmiralCurtiss

For example:

    string_view x("abc");
    string_view y = x.substr(3);
    ASSERT_TRUE(y == "");

I would expect an empty string to be returned.
Compare https://en.cppreference.com/w/cpp/string/basic_string_view/substr

Note: See also bitwizeshift/string_view-standalone#3, same issue there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions