mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
24 lines
641 B
HTML
24 lines
641 B
HTML
<html>
|
|
<body>
|
|
Reports <code>String.format</code> calls that can be replaced with string templates.
|
|
<p>Using string templates makes your code simpler.</p>
|
|
<p>The quick-fix replaces the call with a string template.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
fun main() {
|
|
val id = "abc"
|
|
val date = "123"
|
|
val s = String.format("%s_%s_%s", id, date, id)
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
fun main() {
|
|
val id = "abc"
|
|
val date = "123"
|
|
val s = "${id}_${date}_$id"
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |