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

Add replace and replaceAll functions to String #2813

Closed
darkdrag00nv2 opened this issue Sep 24, 2023 · 1 comment
Closed

Add replace and replaceAll functions to String #2813

darkdrag00nv2 opened this issue Sep 24, 2023 · 1 comment

Comments

@darkdrag00nv2
Copy link
Contributor

darkdrag00nv2 commented Sep 24, 2023

Issue to be solved

Add replace and replaceAll instance functions to Cadence.

  1. replace(_ of: String, _ with: String): String: Returns a new String after replacing first occurrence of of with with.
  2. replaceAll(_ of: String, _ with: String): String: Returns a new String after replacing all occurrences of of with with.

Epic: #1972

Suggested Solution

No response

@turbolent
Copy link
Member

replaceAll was added in #2814. We can add e.g. a replaceFirst when there is demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants