Back to Intellij Community

ConvertFromMultiDollarToRegularString

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/ConvertFromMultiDollarToRegularString.html

2025.3-rc-2480 B
Original Source

Reports all strings with an interpolation prefix.

The quick for the inspection fix removes the interpolation prefix, updates interpolation entries and escapes unsafe dollar characters.

Example:

val foo = $$"""
{
    "foo": $ref,
    "bar": {
        "baz": "$20"
        "boo": "$${100 + 200}"
    }
}
"""

After the quick fix is applied:

val foo = """
{
    "foo": ${'$'}ref,
    "bar": {
        "baz": "$20"
        "boo": "${100 + 200}"
    }
}
"""