-// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.nj2k
AssertStatementConversion(context),
SwitchToWhenConversion(context),
YieldStatementConversion(context),
- LiteralConversion(context),
ForConversion(context),
LabeledStatementConversion(context),
ArrayOperationsConversion(context),
-// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.nj2k.conversions
if (leadingBackslashes.length % 2 == 0)
String.format("%s\\u%04x", leadingBackslashes, Integer.parseInt(matchResult.groupValues[2], 8))
else matchResult.value
- }.replace("""(?<!\\)\$([A-Za-z]+|\{)""".toRegex(), "\\\\$0")
+ }.replace("""\$([A-Za-z]+|\{)""".toRegex(), "\\\\$0")
.replace( "\\f", "\\u000c")
class Test {
void test() {
String name = "$$$$";
- name = name.replaceAll("\\$[0-9]+", "\\$")
+ name = name.replaceAll("\\$[0-9]+", "\\$ \\$a ${a} \\${a}")
char c = '$';
System.out.println(c);
internal class Test {
fun test() {
var name = "$$$$"
- name = name.replace("\\$[0-9]+".toRegex(), "\\$")
+ name = name.replace("\\$[0-9]+".toRegex(), "\\$ \\\$a \${a} \\\${a}")
val c = '$'
println(c)
val C = '$'
println(C)
}
-}
\ No newline at end of file
+}