Gleb Mazovetskiy
e5e007cd3c
Slightly optimize `Utf8CodePointLen`
...
A few more operations but the "lookup table" is now an immediate constant.
https://godbolt.org/z/7YG3ohWT6
2 years ago
Gleb Mazovetskiy
fdb5738815
Add cursor support to DiabloUI and chat
...
Supports move left/right/home/end, backspace, delete, and Ctrl+V.
2 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
Andrew James
60b835214b
Address warnings in Utf8 functions ( #4748 )
...
* Use explicit typecasts to force signed char comparisons
Avoids warnings about tautological comparisons (either the >= 0 comparison for ARM/PowerPC or the <= 127 comparison for x86*)
* Remove unused function
4 years ago
ephphatha
e246ac78db
Simplify character test in UiValidPlayerName
4 years ago
ephphatha
34b7d85263
Add IsLeadUtf8CodeUnit to complement trail byte detection
4 years ago
ephphatha
3c173df83b
Update comment on IsTrailUtf8CodeUnit
...
Also use char literals instead of int literals.
4 years ago
Gleb Mazovetskiy
f22d1d0149
Remove uses of deprecated codecvt
...
codecvt is deprecated in C++17 and we don't really need all of its heavy
machinery for simply converting to UTF-8.
4 years ago
ephphatha
93068de918
Address type conversion warnings in WordWrapString
4 years ago
Anders Jenbo
799f1763af
Performce UTF8 aware limited string copies
4 years ago
Gleb Mazovetskiy
e9a9daa794
DrawString: Stop allocating
...
Switch to a state-machine UTF-8 decoder from the branchless one.
This allows us to avoid copying the string on every `DrawString` call.
4 years ago