You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{code}scala> val a = 1; val s =f"$a%s%n$a%s"
a: Int = 1
s: String = 1%n1{code}
The ScalaDoc for the f interpolator states, "All specifiers allowed in Java format strings are handled, and in the same way they are treated in Java," but when read in context, format specifiers are only supported when in a formatting position. It would be useful if %n was supported directly. As it stands, an additional call to .format() is needed to insert a platform specific line separator.
The text was updated successfully, but these errors were encountered:
{code}scala> val a = 1; val s =f"$a%s%n$a%s"
a: Int = 1
s: String = 1%n1{code}
The ScalaDoc for the f interpolator states, "All specifiers allowed in Java format strings are handled, and in the same way they are treated in Java," but when read in context, format specifiers are only supported when in a formatting position. It would be useful if %n was supported directly. As it stands, an additional call to .format() is needed to insert a platform specific line separator.
The text was updated successfully, but these errors were encountered: