Standard library documentation updates.
This commit is contained in:
@@ -10,9 +10,9 @@ import java.util.*
|
||||
import java.util.Collections // TODO: it's temporary while we have java.util.Collections in js
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T, A : Appendable> Array<out T>.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -30,9 +30,9 @@ public fun <T, A : Appendable> Array<out T>.joinTo(buffer: A, separator: String
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> BooleanArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -50,9 +50,9 @@ public fun <A : Appendable> BooleanArray.joinTo(buffer: A, separator: String = "
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> ByteArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -70,9 +70,9 @@ public fun <A : Appendable> ByteArray.joinTo(buffer: A, separator: String = ", "
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> CharArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -90,9 +90,9 @@ public fun <A : Appendable> CharArray.joinTo(buffer: A, separator: String = ", "
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> DoubleArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -110,9 +110,9 @@ public fun <A : Appendable> DoubleArray.joinTo(buffer: A, separator: String = ",
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> FloatArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -130,9 +130,9 @@ public fun <A : Appendable> FloatArray.joinTo(buffer: A, separator: String = ",
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> IntArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -150,9 +150,9 @@ public fun <A : Appendable> IntArray.joinTo(buffer: A, separator: String = ", ",
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> LongArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -170,9 +170,9 @@ public fun <A : Appendable> LongArray.joinTo(buffer: A, separator: String = ", "
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <A : Appendable> ShortArray.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -190,9 +190,9 @@ public fun <A : Appendable> ShortArray.joinTo(buffer: A, separator: String = ",
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T, A : Appendable> Iterable<T>.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -210,9 +210,9 @@ public fun <T, A : Appendable> Iterable<T>.joinTo(buffer: A, separator: String =
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "...")
|
||||
* Appends the string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T, A : Appendable> Stream<T>.joinTo(buffer: A, separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): A {
|
||||
buffer.append(prefix)
|
||||
@@ -230,99 +230,99 @@ public fun <T, A : Appendable> Stream<T>.joinTo(buffer: A, separator: String = "
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T> Array<out T>.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun BooleanArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun ByteArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun CharArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun DoubleArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun FloatArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun IntArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun LongArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun ShortArray.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T> Iterable<T>.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string from all the elements separated using the *separator* and using the given *prefix* and *postfix* if supplied.
|
||||
* If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will
|
||||
* a special *truncated* separator (which defaults to "..."
|
||||
* Creates a string from all the elements separated using [separator] and using the given [prefix] and [postfix] if supplied.
|
||||
* If the collection could be huge, you can specify a non-negative value of [limit], in which case only the first [limit]
|
||||
* elements will be appended, followed by the [truncated] string (which defaults to "...").
|
||||
*/
|
||||
public fun <T> Stream<T>.joinToString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "..."): String {
|
||||
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated).toString()
|
||||
|
||||
Reference in New Issue
Block a user