akiomik / seaw   0.1.0

Apache License 2.0 GitHub

An alternative to wcwidth for scala, to get fixed width of Unicode characters.

Scala versions: 3.x 2.13 2.12

seaw

seaw Scala version support Scala CI

An alternative to wcwidth for scala, to get fixed width of Unicode characters.

Getting started

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"

Usage

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

Publishing

sbt "+ publishSigned; sonatypeBundleRelease"