File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,14 @@ $nabe = '邊';
5858$ nabe_E0100 = "邊󠄀 " ;
5959var_dump (grapheme_levenshtein ($ nabe , $ nabe_E0100 ));
6060
61+ // variable $nabe and $nabe_E0101 is different because that is IVS.
62+ // $nabe_E0101 is variable selector in U+908A U+E0101.
63+ // grapheme_levenshtein can catches different only match strength is Collator::IDENTICAL.
64+ // So result is maybe 1.
65+ $ nabe = '邊 ' ;
66+ $ nabe_E0101 = "\u{908A}\u{E0101}" ;
67+ var_dump (grapheme_levenshtein ($ nabe , $ nabe_E0101 , strength: Collator::IDENTICAL ));
68+
6169// combining character
6270var_dump (grapheme_levenshtein ("\u{0065}\u{0301}" , "\u{00e9}" ));
6371
@@ -122,6 +130,7 @@ int(2)
122130--- Variable selector ---
123131int(1)
124132int(0)
133+ int(1)
125134int(0)
126135--- Corner case ---
127136grapheme_levenshtein(): Argument #3 ($insertion_cost) must be greater than 0 and less than or equal to %d
You can’t perform that action at this time.
0 commit comments