-
Notifications
You must be signed in to change notification settings - Fork 326
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
Implement Regular Expression replace and update Text.replace
to the new API
#5959
Conversation
Co-authored-by: Radosław Waśko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR has not descriptive title and the checkboxes are not checked. Please be sure to test the PR before merging this PR (this should result in checking the checkboxes).
Text.replace
to the new API
The PR has been fully tested and the description now updated. Please re-review so we can get merged. |
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Regex/Match_2.enso
Outdated
Show resolved
Hide resolved
Already done.
…On Mon, Mar 27, 2023 at 8:04 AM Radosław Waśko ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/Tests/src/Data/Text_Spec.enso
<#5959 (comment)>:
>
- tr_insensitive = Text_Matcher.Case_Insensitive (Locale.new "tr")
- "Iiİı" . replace "i" "-" matcher=tr_insensitive . should_equal "I--ı"
- "Iiİı" . replace "I" "-" matcher=tr_insensitive . should_equal "-iİ-"
- "Iiİı" . replace "İ" "-" matcher=tr_insensitive . should_equal "I--ı"
- "Iiİı" . replace "ı" "-" matcher=tr_insensitive . should_equal "-iİ-"
+ Test.specify "should correctly handle Unicode" <|
+ 'ß'.replace 'S' 'A' case_sensitivity=Case_Sensitivity.Insensitive . should_equal 'AA'
+ 'ß'.replace 'ß' 'A' case_sensitivity=Case_Sensitivity.Insensitive . should_equal 'A'
+ 'affib'.replace 'ffi' 'X' case_sensitivity=Case_Sensitivity.Insensitive . should_equal 'aXb'
Can we add
'affib'.replace 'i' 'X' case_sensitivity=Case_Sensitivity.Insensitive . should_equal 'aXb'
here?
—
Reply to this email directly, view it on GitHub
<#5959 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF2GQOXYE72HKEV27YYBAE3W6F65VANCNFSM6AAAAAAV4JXN2Y>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Pull Request Description
Re-implement replace on top of Truffle regex.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.