Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitely/nim-unicodeplus
Common unicode operations
https://github.com/nitely/nim-unicodeplus
case-conversion case-detection nim nim-lang unicode
Last synced: about 2 months ago
JSON representation
Common unicode operations
- Host: GitHub
- URL: https://github.com/nitely/nim-unicodeplus
- Owner: nitely
- License: mit
- Created: 2018-01-12T15:47:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-29T18:08:10.000Z (about 1 year ago)
- Last Synced: 2024-10-12T07:14:17.170Z (3 months ago)
- Topics: case-conversion, case-detection, nim, nim-lang, unicode
- Language: Nim
- Homepage: https://nitely.github.io/nim-unicodeplus/
- Size: 683 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# UnicodePlus
[![Build Status](https://img.shields.io/github/actions/workflow/status/nitely/nim-unicodeplus/ci.yml?style=flat-square)](https://github.com/nitely/nim-unicodeplus/actions?query=workflow%3ACI)
[![licence](https://img.shields.io/github/license/nitely/nim-unicodeplus.svg?style=flat-square)](https://raw.githubusercontent.com/nitely/nim-unicodeplus/master/LICENSE)Common unicode operations.
## Install
```
nimble install unicodeplus
```## Compatibility
Nim +1.0
## Usage
```nim
import unicodeplusassert "abc def ghi".isLower
assert "ABC DEF GHI".isUpper
assert "A Title - Yes!".isTitle
assert " \L".isWhiteSpace
assert "abc123۲⅕".isAlnum
assert "abcd".isAlpha
assert "0123456789".isDecimal
assert "0123456789۲".isDigit
assert "0123456789۲⅕".isNumeric
assert "abcd".isPrintable
assert "The quick? (“brown”) fox can’t jump 32.3 feet, right?".toTitle ==
"The Quick? (“Brown”) Fox Can’t Jump 32.3 Feet, Right?"
assert "The quick? (“brown”) fox can’t jump 32.3 feet, right?".toUpper ==
"THE QUICK? (“BROWN”) FOX CAN’T JUMP 32.3 FEET, RIGHT?"
assert "The quIck? (“bRown”) fox cAn’T jUMp 32.3 feet, rIGHt?".toLower ==
"the quick? (“brown”) fox can’t jump 32.3 feet, right?"
assert cmpCaseless("AbCσ", "aBcΣ")
assert toValidUtf8("a\xffb", replacement = "") == "ab"
assert verifyUtf8("a\xffb") == 1
```[docs](https://nitely.github.io/nim-unicodeplus/)
## Tests
```
nimble test
```## LICENSE
MIT