Skip to content

Add npos const static member to cudf::string_view - #11166

Merged
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-22.08from
davidwendt:string-view-npos
Jul 8, 2022
Merged

Add npos const static member to cudf::string_view#11166
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-22.08from
davidwendt:string-view-npos

Conversation

@davidwendt

@davidwendt davidwendt commented Jun 28, 2022

Copy link
Copy Markdown
Contributor

Adds npos member to cudf::string_view for consistency with std::string_view::npos https://en.cppreference.com/w/cpp/string/basic_string_view/npos
This is used mainly in the find() and rfind() functions which should return npos when the target string is not found. Code updates are included in this PR to use npos instead. This change will help when building and documenting strings-udf functions that use find() and rfind().
Also moved UNKNOWN_STRING_LENGTH into the string_view class scope since it is only used internally by string_view.
No actual code behavior has changed.

@davidwendt davidwendt added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jun 28, 2022
@davidwendt davidwendt self-assigned this Jun 28, 2022
@codecov

codecov Bot commented Jun 28, 2022

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.08@36ec9a7). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             branch-22.08   #11166   +/-   ##
===============================================
  Coverage                ?   86.30%           
===============================================
  Files                   ?      144           
  Lines                   ?    22698           
  Branches                ?        0           
===============================================
  Hits                    ?    19589           
  Misses                  ?     3109           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36ec9a7...266a318. Read the comment docs.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jul 6, 2022
@davidwendt
davidwendt marked this pull request as ready for review July 6, 2022 18:12
@davidwendt
davidwendt requested a review from a team as a code owner July 6, 2022 18:12
@davidwendt
davidwendt requested review from bdice and devavret July 6, 2022 18:12

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with small questions/comments.

Comment thread cpp/include/cudf/strings/string_view.hpp
Comment thread cpp/include/cudf/strings/string_view.hpp Outdated
Comment thread cpp/include/cudf/strings/string_view.hpp Outdated
Comment thread cpp/include/cudf/strings/string_view.hpp
@davidwendt

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 59d7309 into NVIDIA:branch-22.08 Jul 8, 2022
@davidwendt
davidwendt deleted the string-view-npos branch July 8, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants