Scoop API

scoop:scoop.std:0.1.0

src/sequences/join.scoop

Selected production source · src/sequences/join.scoop

1package scoop.sequences
3import scoop.collections.joinToString
5/**
6 * Consumes this sequence. Joins rendered elements with separator, prefix, and postfix. A
7 * nonnegative limit bounds rendered elements and appends truncated text when more remain.
8 */
9public fun <T> Sequence<T>.joinToString(
10 separator: String = ", ", prefix: String = "", postfix: String = "",
11 limit: Long = -1L, truncated: String = "...", transform: (T) -> String
12): String = terminalInput<T>().joinToString<T>(separator, prefix, postfix, limit, truncated, transform)
14/**
15 * Consumes this sequence. Joins rendered elements with separator, prefix, and postfix. A
16 * nonnegative limit bounds rendered elements and appends truncated text when more remain.
17 */
18public fun <T : ToString> Sequence<T>.joinToString(
19 separator: String = ", ", prefix: String = "", postfix: String = "", limit: Long = -1L, truncated: String = "..."
20): String = terminalInput<T>().joinToString<T>(separator, prefix, postfix, limit, truncated)