项目作者: nitely

项目描述 :
Common unicode operations
高级语言: Nim
项目地址: git://github.com/nitely/nim-unicodeplus.git
创建时间: 2018-01-12T15:47:30Z
项目社区:https://github.com/nitely/nim-unicodeplus

开源协议:MIT License

下载


UnicodePlus

Build Status
licence

Common unicode operations.

Install

  1. nimble install unicodeplus

Compatibility

Nim +1.0

Usage

  1. import unicodeplus
  2. assert "abc def ghi".isLower
  3. assert "ABC DEF GHI".isUpper
  4. assert "A Title - Yes!".isTitle
  5. assert " \L".isWhiteSpace
  6. assert "abc123۲⅕".isAlnum
  7. assert "abcd".isAlpha
  8. assert "0123456789".isDecimal
  9. assert "0123456789۲".isDigit
  10. assert "0123456789۲⅕".isNumeric
  11. assert "abcd".isPrintable
  12. assert "The quick? (“brown”) fox can’t jump 32.3 feet, right?".toTitle ==
  13. "The Quick? (“Brown”) Fox Can’t Jump 32.3 Feet, Right?"
  14. assert "The quick? (“brown”) fox can’t jump 32.3 feet, right?".toUpper ==
  15. "THE QUICK? (“BROWN”) FOX CAN’T JUMP 32.3 FEET, RIGHT?"
  16. assert "The quIck? (“bRown”) fox cAn’T jUMp 32.3 feet, rIGHt?".toLower ==
  17. "the quick? (“brown”) fox can’t jump 32.3 feet, right?"
  18. assert cmpCaseless("AbCσ", "aBcΣ")
  19. assert toValidUtf8("a\xffb", replacement = "") == "ab"
  20. assert verifyUtf8("a\xffb") == 1
  21. assert width("이건 테스트야") == 13

docs

Tests

  1. nimble test

LICENSE

MIT