且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ForEach中的最后一个元素

更新时间:2023-11-09 23:30:46

不,没有这样的内置方式。一般来说也不能有迭代器,因为迭代器不需要知道他们几乎在结束。

No, there is no such built-in way. Nor could there be for iterators in general, because iterators aren't required to know that they are "almost" at the end.