An alternative to wcwidth for scala, to get fixed width of Unicode characters.
seaw is currently available for Scala 2.12, 2.13 and 3.0.
Add the following line to your build.sbt
.
libraryDependencies += "io.github.akiomik" %% "seaw" % "0.1.0"
import io.github.akiomik.seaw.implicits._
"To Sherlock Holmes she is always the woman.".size // => 43
"To Sherlock Holmes she is always the woman.".width // => 43
"吾輩は猫である。名前はまだない。".size // => 16
"吾輩は猫である。名前はまだない。".width // => 32
sbt "+ publishSigned; sonatypeBundleRelease"