https://github.com/akiomik/seaw
An alternative to wcwidth for scala, to get fixed width of Unicode characters.
https://github.com/akiomik/seaw
unicode unicode-characters wcwidth
Last synced: 10 months ago
JSON representation
An alternative to wcwidth for scala, to get fixed width of Unicode characters.
- Host: GitHub
- URL: https://github.com/akiomik/seaw
- Owner: akiomik
- License: apache-2.0
- Created: 2021-08-24T14:10:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-02T18:37:59.000Z (over 4 years ago)
- Last Synced: 2025-04-02T01:52:19.138Z (about 1 year ago)
- Topics: unicode, unicode-characters, wcwidth
- Language: Scala
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# seaw
[](https://index.scala-lang.org/akiomik/seaw/seaw)
[](https://github.com/akiomik/seaw/actions/workflows/scala-ci.yml)
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`.
```scala
libraryDependencies += "io.github.akiomik" %% "seaw" % "0.1.0"
```
## Usage
```scala
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
```sh
sbt "+ publishSigned; sonatypeBundleRelease"
```