Skip to content

Add str conversion methods to std::string::String in sway-lib-std #7121

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

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

camden-smallwood
Copy link
Contributor

Description

This adds string slice conversion support to the std::string::String struct in the Sway standard library through the String::as_str and equivalent impl From<str> for String and impl From<String> for str methods.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@camden-smallwood camden-smallwood requested review from a team as code owners April 25, 2025 12:49
@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Apr 25, 2025

Thanks for the contribution! Before we can merge this, we need @camden-smallwood to sign the Fuel Labs Contributor License Agreement.

@IGI-111 IGI-111 requested a review from a team April 28, 2025 02:23
@JoshuaBatty JoshuaBatty merged commit 00ab8bc into FuelLabs:master Apr 29, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants