Is there a way to use string templates and nulls to implement this code cleaner?
Copy code
fun sql(colb : Int?): String {
val s = StringBuilder("SELECT * FROM TABLE WHERE A=3");
if (colb != null) {
s.append(" AND B=")
s.append(colb)
}
return s.toString()
}