Alter componentN documentation

This commit is contained in:
Abduqodiri Qurbonzoda
2019-10-08 19:42:39 +03:00
parent e54b405fe4
commit 834eeb567b
4 changed files with 87 additions and 87 deletions
@@ -965,10 +965,10 @@ object Elements : TemplateGroupBase() {
else -> "th"
}
val condition = if (n == 1) "this ${f.doc.collection} is empty" else "the size of this ${f.doc.collection} is less than $n"
val condition = "the size of this ${f.doc.collection} is less than $n"
doc {
"""
Returns ${getOrdinal(n)} *element* from the collection.
Returns ${getOrdinal(n)} *element* from the ${f.collection}.
Throws an [IndexOutOfBoundsException] if $condition.
"""
@@ -976,7 +976,7 @@ object Elements : TemplateGroupBase() {
specialFor(ArraysOfObjects, ArraysOfPrimitives, ArraysOfUnsigned) {
doc {
"""
Returns ${getOrdinal(n)} *element* from the collection.
Returns ${getOrdinal(n)} *element* from the ${f.collection}.
If $condition, throws an [IndexOutOfBoundsException] except in Kotlin/JS
where the behavior is unspecified.