Add Name.last extension
This commit is contained in:
parent
706521a6b6
commit
e52d509c2b
@ -134,6 +134,11 @@ public val Name.length: Int get() = tokens.size
|
||||
*/
|
||||
public fun Name.lastOrNull(): NameToken? = tokens.lastOrNull()
|
||||
|
||||
/**
|
||||
* Last token or throw exception
|
||||
*/
|
||||
public fun Name.last(): NameToken = tokens.last()
|
||||
|
||||
/**
|
||||
* First token of the name or null if it is empty
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user