Add samples for contentToString and contentDeepToString array operations

This commit is contained in:
Ilya Gorbunov
2017-04-21 21:42:11 +03:00
parent 934b0b8c38
commit ef72371fd7
5 changed files with 117 additions and 1 deletions
@@ -93,7 +93,13 @@ fun arrays(): List<GenericFunction> {
only(ArraysOfObjects, ArraysOfPrimitives)
since("1.1")
inline(Platform.JVM, Inline.Only)
doc { "Returns a string representation of the contents of the specified array as if it is [List]." }
doc {
"""
Returns a string representation of the contents of the specified array as if it is [List].
@sample samples.collections.Arrays.ContentOperations.contentToString
"""
}
returns("String")
body(Platform.JVM) { "return java.util.Arrays.toString(this)" }
annotations(Platform.JS, """@library("arrayToString")""")
@@ -111,6 +117,8 @@ fun arrays(): List<GenericFunction> {
If any of arrays contains itself on any nesting level that reference
is rendered as `"[...]"` to prevent recursion.
@sample samples.collections.Arrays.ContentOperations.contentDeepToString
"""
}
returns("String")