Skip to content

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

Closed
@micosu

Description

@micosu

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions