SeparatedItemStringBuilder

Builds a string containing a list of items with a prefix, a postfix, and a separator. Example: (1,2,3) which has prefix "(", separator ",", postfix ")" and the items 1 through 3.

Java 8 offers the very nice Collectors.joining(String, String, String) which does the same thing.

Constructors

Link copied to clipboard
constructor(prefix: String, separator: String, postfix: String)

Functions

Link copied to clipboard
Add one item.
Link copied to clipboard
open fun hasItems(): Boolean
Link copied to clipboard
open fun toString(): String
Convert the builder into its final string representation.