Is it by any chance possible to use .trimMargin() ...
# announcements
a
Is it by any chance possible to use .trimMargin() on
const val
?
a
const val foo = """ some text """.trimMargin()
?
s
I’m pretty certain that won’t work
in order for a value to be
const
it needs to be a string or a primitive that the kotlin compiler can inline where the
val
is used
a
yeah, it needs to be a constant
a
It won't work as this because it's compile-time
May be an other way exists
k
There isn't any compile time evaluation yet.
s
you’d have to have a version of your string already trimmed if you need it to be
const
which isn’t really necessary unless you’re passing some large string to an annotation or something 🤔
a
so no compile-time trimming of any sort?
s
not yet anyhow