Skip to content

Commit

Permalink
Mutation code
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Jan 29, 2025
1 parent 45f1b4a commit 8a59f48
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,40 @@ public static <T> void printData(EmojiDataSource emojiDataSource) throws IOExcep
System.out.println(
CandidateData.getInstance().getExtendedPictographic().contains("🦰"));
UnicodeSet emoji_pict = emojiDataSource.getExtendedPictographic();
UnicodeSet emoji_pict_to_remove =
emoji_pict
.cloneAsThawed()
.removeAll(iup.getProperty(UcdProperty.General_Category).getSet("Cn"))
.removeAll(emoji)
.freeze();
UnicodeSet emoji_pict_to_remove_16 =
emoji_pict_to_remove
.cloneAsThawed()
.removeAll(
IndexUnicodeProperties.make(Age_Values.V16_0)
.getProperty(UcdProperty.General_Category)
.getSet("Cn"))
.freeze();
if (emoji_pict_to_remove_16.size() != 672) {
throw new IllegalArgumentException(emoji_pict_to_remove_16.toString());
}
System.out.println(
"Unassigning Extended_Pictographic from "
+ emoji_pict_to_remove.size()
+ " characters, including 672 characters present in 16.0, as well as:");
emoji_pict = emoji_pict.cloneAsThawed().removeAll(emoji_pict_to_remove).freeze();
var out = new PrintWriter(System.out);
printer.show(
out,
"",
null,
0,
14,
emoji_pict_to_remove.cloneAsThawed().removeAll(emoji_pict_to_remove_16),
true,
false,
false);
out.flush();
outText2.println(
Utility.getBaseDataHeaderWithVersionText(
"emoji-data", 51, "Emoji Data", versionTextForUCD));
Expand Down

0 comments on commit 8a59f48

Please sign in to comment.