Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 939b265

Browse files
authored
Update README.md
1 parent 4cfa049 commit 939b265

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Its implementation is successfully in the middle between small memory footprint
3636
- `size()` returns the size of the data in bytes, `length()` returns the number of codepoints contained.
3737

3838
## THE PURPOSE OF TINY-UTF8
39-
Back when I decided to write a UTF8 solution for C++, I knew I wanted a drop-in replacement for `std::string`. At the time mostly because I found it neat to have one and felt C++ always lacked accessible support for UTF8. Since then, several years have passed and the situation has not improved much. That said, things currently look like they are about to improve - but that doesn't say much, does it?
39+
Back when I decided to write a UTF8 solution for C++, I knew I wanted a drop-in replacement for `std::string`. At the time mostly because I found it neat to have one and felt C++ always lacked accessible support for UTF8. Since then, several years have passed and the situation has not improved much. That said, things currently look like they are about to improve - but that doesn't say much, eh?
4040

4141
The opinion shared by many "experienced Unicode programmers" (e.g. published on [UTF-8 Everywhere](https://www.utf8everywhere.org)) is that "non-experienced" programmers both *under* and *over*estimate the need for Unicode- and encoding-specific treatment: This need is...
4242
1. **overestimated**, because many times we really should care less about codepoint/grapheme borders within string data;
@@ -58,7 +58,7 @@ Unicode is not rocket science but nonetheless hard to get *right*. **Tiny-utf8**
5858

5959
Note: ANSI suppport was dropped in Version 2.0 in favor of execution speed.
6060

61-
## EXAMPLE USAGE
61+
## EXAMPLE
6262

6363
```cpp
6464
#include <iostream>
@@ -76,14 +76,14 @@ int main()
7676
}
7777
```
7878

79-
### EXCEPTIONS
79+
## EXCEPTION BEHAVIOR
8080

8181
- **Tiny-utf8** should automatically detect, whether your build system allows the use of exceptions or not. This is done by checking for the feature test macro `__cpp_exceptions`.
8282
- If you would like **tiny-utf8** to be `noexcept` anyway, `#define` the macro `TINY_UTF8_NOEXCEPT`.
8383
- If you would like **tiny-utf8** to use a different exception strategy, `#define` the macro `TINY_UTF8_THROW( location , failing_predicate )`. For using assertions, you would write `#define TINY_UTF8_THROW( _ , pred ) assert( pred )`.
8484
- *Hint:* If exceptions are disabled, `TINY_UTF8_THROW( ... )` is automatically defined as `void()`. This works well, because all uses of `TINY_UTF8_THROW` are immediately followed by a `;` as well as a proper `return` statement with a fallback value. That also means, `TINY_UTF8_THROW` can safely be a NO-OP.
8585

86-
### BACKWARDS-COMPATIBILITY
86+
## BACKWARDS-COMPATIBILITY
8787

8888
#### *CHANGES BETWEEN Version 4.3 and 4.2*
8989

0 commit comments

Comments
 (0)