unicode_blocr
Version, currently 0.1.02 versions
- 0.2.0latestJul 9, 2019
- 0.1.0not indexedJul 9, 2019
github.com/j8r/unicode_blocr
Identify the Unicode block to which a character belongs
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
unicode_blocr:
github: j8r/unicode_blocr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Unicode Blocr
Identify the Unicode block to which a character belongs.
This library can be used to identify the type of characters, and eventually filter them (for example emoticons).
In Unicode, a block is defined as one contiguous range of code points (https://en.wikipedia.org/wiki/Unicode_block).
Installation
Add the dependency to your shard.yml:
dependencies:
unicode_blocr:
github: j8r/unicode_blocr
Usage examples
Basic
To print the block range to which the character belongs:
require "unicode_blocr"
puts UnicodeBlock.new 'a' #=> UnicodeBlock::BasicLatin
puts UnicodeBlock.new 'é' #=> UnicodeBlock::Latin1Supplement
Filter characters
To keep all characters inferior to a block range, here MiscellaneousSymbolsandPictographs and Emoticons,
we delete all characters belonging to blocks above MiscellaneousSymbolsandPictographs.
require "unicode_blocr"
puts "hi😊".delete &.ord.>= UnicodeBlock::EnclosedIdeographicSupplement.value #=> hi
puts "café".delete &.ord.>= UnicodeBlock::BasicLatin.value #=> caf
License
Copyright (c) 2018-2019 Julien Reichardt - ISC License
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jul 9, 2019
- Commit
c84ba14f92df- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/j8r/unicode_blocr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 2