kotlin.collections.indexOf

indexOf

fun <T> Iterable<T>.indexOf(element: T): Int

Returns first index of element, or -1 if the collection does not contain element.

fun <T> List<T>.indexOf(element: T): Int

Returns first index of element, or -1 if the list does not contain element.

fun <T> Array<out T>.indexOf(element: T): Int
fun ByteArray.indexOf(element: Byte): Int
fun ShortArray.indexOf(element: Short): Int
fun IntArray.indexOf(element: Int): Int
fun LongArray.indexOf(element: Long): Int
fun FloatArray.indexOf(element: Float): Int
fun DoubleArray.indexOf(element: Double): Int
fun BooleanArray.indexOf(element: Boolean): Int
fun CharArray.indexOf(element: Char): Int

Returns first index of element, or -1 if the array does not contain element.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index-of.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部