Project

charcutter

0.0
The project is in a healthy, maintained state
[Unicode 18.0.0] Be in charge of your strings.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Charcutter [version] [ci]

Be in control of what codepoints your string contains. Charcutter provides current Unicode-based regexs to restrict or permit certain characters in your user input.

Version 0.1.0: Only ignorable characters are supported.

Unicode version: 18.0.0 (September 2026)

Gemfile

gem "charcutter"

Usage

require "charcutter"

# Example string containing U+FE00 is VARIATION SELECTOR-1, an ignorable codepoint
string = "A\u{FE00}B"

# Wrap string in Charcutter[] and call deny with codepoint types to remove
Charcutter[string].deny(:ignorable) # => "AB"

See unicode-confusable for for a use-case of this library.

MIT License