Download src/php/php-src/ext/mbstring/php_unicode.h from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 7.74 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mbstring/php_unicode.h
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/mbstring/php_unicode.h
-
curl -L -o php_unicode.h https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mbstring/php_unicode.h
7.74 kB
| /* | |
| +----------------------------------------------------------------------+ | |
| | Copyright (c) The PHP Group | | |
| +----------------------------------------------------------------------+ | |
| | This source file is subject to version 3.01 of the PHP license, | | |
| | that is bundled with this package in the file LICENSE, and is | | |
| | available through the world-wide-web at the following url: | | |
| | https://www.php.net/license/3_01.txt | | |
| | If you did not receive a copy of the PHP license and are unable to | | |
| | obtain it through the world-wide-web, please send a note to | | |
| | license@php.net so we can mail you a copy immediately. | | |
| +----------------------------------------------------------------------+ | |
| | Author: Wez Furlong (wez@thebrainroom.com) | | |
| +----------------------------------------------------------------------+ | |
| Based on code from ucdata-2.5, which has the following Copyright: | |
| Copyright 2001 Computing Research Labs, New Mexico State University | |
| Permission is hereby granted, free of charge, to any person obtaining a | |
| copy of this software and associated documentation files (the "Software"), | |
| to deal in the Software without restriction, including without limitation | |
| the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| and/or sell copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in | |
| all copies or substantial portions of the Software. | |
| */ | |
| /* Merged property categories */ | |
| /* Derived properties from DerivedCoreProperties.txt */ | |
| MBSTRING_API bool php_unicode_is_prop(unsigned long code, ...); | |
| MBSTRING_API bool php_unicode_is_prop1(unsigned long code, int prop); | |
| typedef enum { | |
| PHP_UNICODE_CASE_UPPER = 0, | |
| PHP_UNICODE_CASE_LOWER, | |
| PHP_UNICODE_CASE_TITLE, | |
| PHP_UNICODE_CASE_FOLD, | |
| PHP_UNICODE_CASE_UPPER_SIMPLE, | |
| PHP_UNICODE_CASE_LOWER_SIMPLE, | |
| PHP_UNICODE_CASE_TITLE_SIMPLE, | |
| PHP_UNICODE_CASE_FOLD_SIMPLE, | |
| PHP_UNICODE_CASE_MODE_MAX | |
| } php_case_mode; | |
| MBSTRING_API zend_string *php_unicode_convert_case( | |
| php_case_mode case_mode, const char *srcstr, size_t srclen, | |
| const mbfl_encoding *src_encoding, const mbfl_encoding *dst_encoding, int illegal_mode, uint32_t illegal_substchar); | |
| /* Optimize the common ASCII case for lower/upper */ | |
| static inline int php_unicode_is_lower(unsigned long code) { | |
| if (code < 0x80) { | |
| return code >= 0x61 && code <= 0x7A; | |
| } else { | |
| return php_unicode_is_prop1(code, UC_LL); | |
| } | |
| } | |
| static inline int php_unicode_is_upper(unsigned long code) { | |
| if (code < 0x80) { | |
| return code >= 0x41 && code <= 0x5A; | |
| } else { | |
| return php_unicode_is_prop1(code, UC_LU); | |
| } | |
| } | |
| /* | |
| * Directionality macros. | |
| */ | |
| /* | |
| * Other macros inspired by John Cowan. | |
| */ | |
| /* | |
| * Other miscellaneous character property macros. | |
| */ | |
| /* | |
| * Derived core properties. | |
| */ | |