rspec/rules/S5868/kotlin/rule.adoc

31 lines
526 B
Plaintext
Raw Normal View History

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,kotlin]
----
"cc̈d̈d".replace(Regex("[c̈d̈]"), "X") // Noncompliant, print "XXXXXX" instead of expected "cXXd".
----
=== Compliant solution
2022-02-04 17:28:24 +01:00
[source,kotlin]
----
"cc̈d̈d".replace(Regex("c̈|d̈"), "X") // print "cXXd"
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
endif::env-github,rspecator-view[]