Returns the number of words in the string without creating intermediate objects.
Executes the given action for each segment of the CharSequence split by the delimiter. This function avoids creating intermediate collections, making it more memory-efficient for large strings or frequent calls compared to String.split().forEach().
String.split().forEach()