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

Split method doesn't work with string interpolation and special symbols #13293

Closed
micosu opened this issue Aug 13, 2021 · 1 comment · Fixed by #13367
Closed

Split method doesn't work with string interpolation and special symbols #13293

micosu opened this issue Aug 13, 2021 · 1 comment · Fixed by #13367
Assignees
Milestone

Comments

@micosu
Copy link

micosu commented Aug 13, 2021

Compiler version 3.0.2-RC1

Minimized code

scala> val str = f"random\n"
val res0: String = random\n
scala> val str.split("\n")
val res1: Array[String] = Array(random\n)

Expectation

The split method should remove the \n at the end of the string, but with Scala's string interpolation in Scala 3 the split method does not properly remove some special symbols

@som-snytt
Copy link
Contributor

Duplicates #11750 where f-interpolator doesn't attempt to process escapes.

I have a PR to submit for the f-interpolator issues, forthcoming shortly. Thanks for the ticket, sorry for delayed fix.

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

Successfully merging a pull request may close this issue.

3 participants