Colton Idle
07/07/2022, 2:59 PMmyCowboy.split("\\$")
Sam
07/07/2022, 3:01 PM\
in the Kotlin string\$
ephemient
07/07/2022, 3:02 PMSam
07/07/2022, 3:02 PMephemient
07/07/2022, 3:02 PMColton Idle
07/07/2022, 3:03 PM.split(regex = "\\$".toRegex())
ephemient
07/07/2022, 3:04 PM"""\$""".toRegex()
backslashes don't need to be escaped in multiline quotessreich
07/07/2022, 3:54 PMColton Idle
07/07/2022, 4:05 PMKlitos Kyriacou
07/07/2022, 4:10 PMmyCowboy.split('$')
nkiesel
07/07/2022, 11:42 PMmyCowboy.split("$")
. Normally, you would have to quote the $
in strings if you want a literal $
because of Kotlin's templating. However, a $
at the end of a String literal does not require quoting.ephemient
07/07/2022, 11:44 PM$
before anything that doesn't look like interpolation will work without escapingnkiesel
07/07/2022, 11:45 PMephemient
07/07/2022, 11:45 PM"$0"
, "$$"
, "$[]"
, etc.