This article explores different ways to convert a list of characters to String in Kotlin.

1. Using String Constructor

The standard solution to accumulate specified list characters into a string is with the String constructor.

Download Code

2. Using joinToString() function

We can use the joinToString() function to create a string from a sequence of characters. To create a plain string, pass an empty string as a delimiter to the joinToString() function.

Download Code

3. Using concatToString() function

Alternatively, you can use the concatToString() function, which concatenates characters of the CharArray into a string. Since the input is a list, first convert it to a primitive character array using the toCharArray() function.

Download Code

4. Using StringBuilder

Here, the idea to iterate over the specified list characters and append each char to a StringBuilder instance. Finally, make a call to the toString() function to get a string object.

Download Code

That’s all about converting a list of characters to a string in Kotlin.