You may assign '\u0000' (or 0). For this purpose, use Character.MIN_VALUE.

Character ch = Character.MIN_VALUE;
Answer from KV Prajapati on Stack Overflow
🌐
Bartkessels
bartkessels.net › kotlin › empty-char-literal
Kotlin giving an empty char literal error | Bart Kessels
May 5, 2023 - So after some Googling I came accross a Java thread on Stack Overflow, saying that in Java a character can not be empty just like other primitives (the Stackoverflow post). So in Kotlin (and Java for that matter), the solution was as simple as returning a 0.
Discussions

java - How do I make a Null character in Kotlin - Stack Overflow
In Java, one can use the escape sequence \0 to represent the Null character \0 and \0000 are not valid escape sequences in Kotlin, so I've been using a static java char and accessing that from Kot... More on stackoverflow.com
🌐 stackoverflow.com
CharSequence.isEmpty() - Language Design - Kotlin Discussions
I am using Kotlin version 1.4.10 for JVM and Java version 15. I have a String property named text. When I write if (text.length == 0), IDEA suggests that I “Replace size zero check with isEmpty”. But when I accept tha… More on discuss.kotlinlang.org
🌐 discuss.kotlinlang.org
6
September 17, 2020
String.Empty Field - Language Design - Kotlin Discussions
Requesting built-in read only representation of the empty string similler to C# .NET has on MSDN for example: public class String /* some code */ { companion object { @JvmField public val Empty: Str… More on discuss.kotlinlang.org
🌐 discuss.kotlinlang.org
4
November 8, 2017
How to initialize and use charArray in Kotlin - Stack Overflow
var str : CharArray = CharArray(3) ... empty array var str : CharArray? = null //makes your array nullable ... Sign up to request clarification or add additional context in comments. ... So, I'd recommended to use charArrayOf(). And after user's input you can set this field to new CharArray with known size 2019-04-30T08:00:12.43Z+00:00 ... There are many ways to initialize arrays in Kotlin... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Kotlin
kotlinlang.org › api › core › kotlin-stdlib › kotlin.ranges › -char-range › -companion › -e-m-p-t-y.html
EMPTY
kotlin-stdlib/kotlin.ranges/CharRange/Companion/EMPTY · val EMPTY: CharRange(source) An empty range of values of type Char. 1.0 · Thanks for your feedback! Was this page helpful?
🌐
Kotlin
kotlinlang.org › api › core › kotlin-stdlib › kotlin › -char
Char | Core API – Kotlin Programming Language
On the JVM, non-nullable values of this type are represented as values of the primitive type char.
🌐
Kotlin Discussions
discuss.kotlinlang.org › language design
CharSequence.isEmpty() - Language Design - Kotlin Discussions
September 17, 2020 - I am using Kotlin version 1.4.10 for JVM and Java version 15. I have a String property named text. When I write if (text.length == 0), IDEA suggests that I “Replace size zero check with isEmpty”. But when I accept that suggestion and write if (text.isEmpty()), then I get the warning that “isEmpty():Boolean is deprecated”. I suspect that the problem is related to the fact that I recently upgraded to Java 15, and Java 15 added a default method isEmpty() to interface CharSequence, but in search...
🌐
Kotlin
kotlinlang.org › api › core › kotlin-stdlib › kotlin.text › is-blank.html
isBlank | Core API – Kotlin Programming Language
kotlin-stdlib/kotlin.text/isBlank · fun CharSequence.isBlank(): Boolean(source) Returns true if this char sequence is empty or consists solely of whitespace characters according to Char.isWhitespace.
Find elsewhere
🌐
Kotlin
kotlinlang.org › api › latest › jvm › stdlib › kotlin.text › if-empty.html
ifEmpty - Kotlin Programming Language
import java.util.Locale import kotlin.test.* fun main(args: Array<String>) { //sampleStart val empty = "" val emptyOrNull: String?
🌐
Kotlin
kotlinlang.org › api › latest › jvm › stdlib › kotlin.text › if-blank.html
ifBlank - Kotlin Programming Language
Try the revamped Kotlin docs design! ... Returns this char sequence if it is not empty and doesn't consist solely of whitespace characters, or the result of calling defaultValue function otherwise.
🌐
Kotlin Discussions
discuss.kotlinlang.org › language design
String.Empty Field - Language Design - Kotlin Discussions
November 8, 2017 - Requesting built-in read only representation of the empty string similler to C# .NET has on MSDN for example: public class String /* some code */ { companion object { @JvmField public val Empty: String = "" } } Uses: String.Empty
🌐
Kotlin
kotlinlang.org › api › latest › jvm › stdlib › kotlin › -char
Char - Kotlin Programming Language
August 10, 2022 - Try the revamped Kotlin docs design! ... Represents a 16-bit Unicode character.
🌐
TutorialKart
tutorialkart.com › kotlin › kotlin-create-empty-string
How to Create an Empty String in Kotlin?
March 13, 2023 - To create an empty String in Kotlin, assign the variable with empty double quotes "", or with String class constructor String().
🌐
Kotlin
kotlinlang.org › api › core › kotlin-stdlib › kotlin.text › is-null-or-empty.html
isNullOrEmpty | Core API – Kotlin Programming Language
kotlin-stdlib/kotlin.text/isNullOrEmpty · inline fun CharSequence?.isNullOrEmpty(): Boolean(source) Returns true if this nullable char sequence is either null or empty.
🌐
Kotlin
kotlinlang.org › api › core › kotlin-stdlib › kotlin.text › is-empty.html
isEmpty | Core API – Kotlin Programming Language
kotlin-stdlib/kotlin.text/isEmpty · inline fun CharSequence.isEmpty(): Boolean(source) Returns true if this char sequence is empty (contains no characters).
🌐
Kotlin
kotlinlang.org › api › latest › jvm › stdlib › kotlin.text › is-whitespace.html
isWhitespace - Kotlin Programming Language
June 17, 2022 - Returns true if the character is whitespace. import java.util.* import kotlin.test.* fun main(args: Array<String>) { //sampleStart val chars = listOf(' ', '\t', '\n', '1', 'a', '\u00A0') val (whitespaces, notWhitespaces) = chars.partition { ...
🌐
Kotlin
kotlinlang.org › api › latest › jvm › stdlib › kotlin.text › is-empty.html
Kotlinlang
Try the revamped Kotlin docs design! ... Functions for working with text and regular expressions. An object to which char sequences and values can be appended.
🌐
Kotlin Discussions
discuss.kotlinlang.org › language design
Kotlin CharSequence.nullIfEmpty() - Language Design - Kotlin Discussions
August 26, 2020 - Hello, I find it weird that there is no method for converting an empty String(CharSequence) to null by default in the std. value?.let { if (it.isEmpty()) null else it } There should be an extension to do this using something like: value?.nullIfEmpty()