sheredom / utf8.h

📚 single header utf8 string functions for C and C++
The Unlicense
1.71k stars 122 forks source link

Added utf8codepointsize and utf8addcodepoint #27

Closed codecat closed 8 years ago

codecat commented 8 years ago

Let me know if this looks okay. I haven't done huge testing on this yet, but the quick tests seem to go fine.

Talking about tests, I'm also not sure how to add unit tests to this pull request. Any tips?

codecat commented 8 years ago

I accidentally pushed this to my master branch instead of a new branch. Oh well. This works too.

sheredom commented 8 years ago

It would be super awesome if you could add a simple test case for each of the functions to test/main.c just to make sure they do as expected for some trivial input (if you don't have time I can do it later though)

codecat commented 8 years ago

Sure, I'll have to figure out how exactly that file works.