v1.8.10
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← Docs
kotlin-stdlib / kotlin.text / Regex / escapeReplacement

escapeReplacement

Common
JVM
JS
1.0
fun escapeReplacement(literal: String): String
(Common source) (JVM source) (JS source)

Returns a literal replacement expression for the specified literal string. No characters of that string will have special meaning when it is used as a replacement string in Regex.replace function.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains