Nim:查找数组或序列中某项的索引

Nim: find the index of an item in an array or sequence

是否有内置方法来查找数组或序列中项目的索引,相当于 Python index ? (它可能 return 第一次出现的索引,或所有索引。)

find.

Returns the first index of item in a or -1 if not found. This requires appropriate items and == operations to work.