Skip to content

Commit

Permalink
Add emoji testing function
Browse files Browse the repository at this point in the history
Extend ctype functions with an function that detects Unicode 15.1
emojis.
  • Loading branch information
RauliL committed Feb 8, 2024
1 parent 7cef268 commit 5713ec0
Show file tree
Hide file tree
Showing 4 changed files with 488 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ following functions inside `peelo::unicode::ctype` namespace:
- `isxdigit()`
- `tolower()`
- `toupper()`
- And additional `isvalid()` function which tests whether given value is valid
Unicode codepoint.

Additional functions not found in `ctype.h` are:

- `isvalid()` - Tests whether given value is valid Unicode codepoint.
- `isemoji()` - Tests whether given Unicode codepoint is an [emoji].

[ctype.h]: https://en.cppreference.com/w/cpp/header/cctype
[emoji]: https://en.wikipedia.org/wiki/Emoji

### Example

Expand Down
1 change: 1 addition & 0 deletions include/peelo/unicode/ctype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <peelo/unicode/ctype/isblank.hpp>
#include <peelo/unicode/ctype/iscntrl.hpp>
#include <peelo/unicode/ctype/isdigit.hpp>
#include <peelo/unicode/ctype/isemoji.hpp>
#include <peelo/unicode/ctype/isgraph.hpp>
#include <peelo/unicode/ctype/islower.hpp>
#include <peelo/unicode/ctype/isprint.hpp>
Expand Down
Loading

0 comments on commit 5713ec0

Please sign in to comment.