Skip to content

Instantly share code, notes, and snippets.

@robertStrunk
Last active September 3, 2024 16:35
Show Gist options
  • Save robertStrunk/c914fdcdd1eaadfd85306a899ddad8f6 to your computer and use it in GitHub Desktop.
Save robertStrunk/c914fdcdd1eaadfd85306a899ddad8f6 to your computer and use it in GitHub Desktop.
Winter 25 - See Improved Consistency When Iterating Sets.
Set<String> set_string = new Set<String>{'one', 'two', 'three'};
for (String str : set_string) {
System.debug(str);
set_string.remove(str);
System.debug(set_string.contains(str));
}
System.debug(set_string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment