More standard library documentation.
This commit is contained in:
@@ -32,6 +32,11 @@ private fun generateDownTos(outputFile: File, header: String) {
|
||||
}
|
||||
|
||||
writer.println("""
|
||||
/**
|
||||
* Returns a progression from this value down to the specified [to] value.
|
||||
*
|
||||
* The [to] value has to be less than this value.
|
||||
*/
|
||||
public fun $fromType.downTo(to: $toType): $progressionType {
|
||||
return $progressionType($fromExpr, $toExpr, $incrementExpr)
|
||||
}""")
|
||||
|
||||
@@ -277,7 +277,7 @@ fun elements(): List<GenericFunction> {
|
||||
templates add f("first(predicate: (T) -> Boolean)") {
|
||||
inline(true)
|
||||
|
||||
doc { """"Returns the first element matching the given [predicate].
|
||||
doc { """Returns the first element matching the given [predicate].
|
||||
@throws NoSuchElementException if no such element is found.""" }
|
||||
doc(Strings) { """Returns the first character matching the given [predicate].
|
||||
@throws NoSuchElementException if no such character is found.""" }
|
||||
@@ -293,8 +293,8 @@ fun elements(): List<GenericFunction> {
|
||||
templates add f("firstOrNull(predicate: (T) -> Boolean)") {
|
||||
inline(true)
|
||||
|
||||
doc { "Returns first element matching the given [predicate], or `null` if element was not found" }
|
||||
doc(Strings) { "Returns first character matching the given [predicate], or `null` if character was not found" }
|
||||
doc { "Returns the first element matching the given [predicate], or `null` if element was not found" }
|
||||
doc(Strings) { "Returns the first character matching the given [predicate], or `null` if character was not found" }
|
||||
returns("T?")
|
||||
body {
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user