Add samples for contentToString and contentDeepToString array operations
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user