W3cubDocs

/Kotlin

trimEnd

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun CharSequence.trimEnd(
    predicate: (Char) -> Boolean
): CharSequence

Returns a sub sequence of this char sequence having trailing characters matching the predicate removed.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun String.trimEnd(
    predicate: (Char) -> Boolean
): String

Returns a string having trailing characters matching the predicate removed.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun CharSequence.trimEnd(vararg chars: Char): CharSequence

Returns a sub sequence of this char sequence having trailing characters from the chars array removed.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun String.trimEnd(vararg chars: Char): String

Returns a string having trailing characters from the chars array removed.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun CharSequence.trimEnd(): CharSequence

Returns a sub sequence of this char sequence having trailing whitespace removed.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun String.trimEnd(): String

Returns a string having trailing whitespace removed.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/trim-end.html