rivo / uniseg

Unicode Text Segmentation, Word Wrapping, and String Width Calculation in Go
MIT License
570 stars 60 forks source link

The difference between V0.2.0 and the latest version #23

Closed xuetuyic1 closed 1 year ago

xuetuyic1 commented 1 year ago

Since my Golang version is 1.12, I can only use version v0.2.0. I want to confirm the difference between V0.2.0 and the latest version

Could someone help me out?

rivo commented 1 year ago

In addition to grapheme cluster breaking, uniseg now also supports word breaking, sentence breaking and line breaking (=word wrapping). And there are additional tools that come with a big performance improvement over using the Graphemes class.

If you don't need any of that, it's fine to keep using the old version.

Also, the new version is backwards-compatible. So even if you upgrade at a later time, you will not have to make any changes to your code.