mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Make improvements
- wcsstr() is now linearly complex - strstr16() is now linearly complex - strstr() is now vectorized on aarch64 (10x) - strstr() now uses KMP on pathological cases - memmem() is now vectorized on aarch64 (10x) - memmem() now uses KMP on pathological cases - Disable shared_ptr::owner_before until fixed - Make iswlower(), iswupper() consistent with glibc - Remove figure space from iswspace() implementation - Include line and paragraph separator in iswcntrl() - Use Musl wcwidth(), iswalpha(), iswpunct(), towlower(), towupper()
This commit is contained in:
parent
e1528a71e2
commit
7c83f4abc8
67 changed files with 5602 additions and 5165 deletions
|
@ -22,8 +22,11 @@
|
|||
* Returns nonzero if c is printable.
|
||||
*/
|
||||
int iswprint(wint_t c) {
|
||||
return !((0x00 <= c && c <= 0x1F) || (0x7F <= c && c <= 0x9F) ||
|
||||
(0xFFF9 <= c && c <= 0xFFFB) || c == 0x2028 || c == 0x2029);
|
||||
return (0 <= c && c <= 0x10FFFD) && // legal unicode
|
||||
!(0x0000 <= c && c <= 0x001F) && // c0 control codes
|
||||
!(0x007F <= c && c <= 0x009F) && // c1 control codes
|
||||
!(0x2028 <= c && c <= 0x2029) && // line / paragraph separator
|
||||
!(0xFFF9 <= c && c <= 0xFFFB); // interlinear annotation controls
|
||||
}
|
||||
|
||||
__weak_reference(iswprint, iswprint_l);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue