Skip to content

Conversation

youkidearitai
Copy link
Contributor

@youkidearitai youkidearitai commented Oct 14, 2024

related: #16043

mbstring based levenshtein function is codepoint unit.
However, codepoint unit can not measure combined character, variable selector and etc...
So I create measure levenshtein for grapheme cluster unit.

RFC: https://wiki.php.net/rfc/grapheme_levenshtein

Measure levenshtein for grapheme cluster unit
@youkidearitai
Copy link
Contributor Author

I'm sorry. I will close this PR.

@youkidearitai youkidearitai deleted the grapheme_levenshtein branch March 14, 2025 04:54
@youkidearitai youkidearitai restored the grapheme_levenshtein branch March 14, 2025 07:13

intl_convert_utf8_to_utf16(&ustring1, &ustring1_len, pstr1, ZSTR_LEN(string1), &ustatus1);

if ( U_FAILURE( ustatus1 ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't usually add spaces between ( and it's contents, like:

if (U_FAILURE(ustatus1)) {


if ( U_FAILURE( ustatus1 ) ) {
/* Set global error code. */
intl_error_set_code( NULL, ustatus1 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, and in my other situations in this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants