Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seastar::sstring.find() is not compatible with std::string.find() #1001

Closed
longqimin opened this issue Jan 18, 2022 · 1 comment
Closed

seastar::sstring.find() is not compatible with std::string.find() #1001

longqimin opened this issue Jan 18, 2022 · 1 comment

Comments

@longqimin
Copy link

    seastar::sstring empty = "";
    std::string std_empty = "";
    CHECK_EQ(empty.find(empty), std_empty.find(std_empty));

the above check will fail because seastar::sstring.find() return 4294967295 while std::string.find() returns 0.

@longqimin longqimin changed the title seastar::sstring.find() is not compatable with std::string.find() seastar::sstring.find() is not compatible with std::string.find() Jan 18, 2022
@nyh
Copy link
Contributor

nyh commented Jan 18, 2022

This is not the only difference between seastar::sstring and std::string - see issue #634 for more, but you're right that this sort of difference is completely unnecessary and can and should be fixed. A patch (and an accompanying test) would be welcome :-)

longqimin pushed a commit to longqimin/seastar that referenced this issue Jan 18, 2022
longqimin pushed a commit to longqimin/seastar that referenced this issue Jan 18, 2022
longqimin pushed a commit to longqimin/seastar that referenced this issue Jan 18, 2022
longqimin pushed a commit to longqimin/seastar that referenced this issue Jan 19, 2022
@nyh nyh closed this as completed in fde471f Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants