Skip to content

Repository files navigation

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

About

Be in charge of your strings

Topics

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages