Kotlin String.replace() Online
Replace target text with another value.
Run details
The output updates as you type. The tool processes input in your browser.
Worked example
Literal replacement treats punctuation as text. Use the regex replacement tool when the target is a pattern.
- Search
"hello"- Replace
"hi"- Count (-1 all)
-1
hello world hello
hi world hi
Using this operation in Kotlin
The interactive result uses JavaScript. Kotlin String APIs expose character indexes and case conversion. Check whether your code targets JVM, JS, Native, or Wasm when depending on platform-specific utilities.