diff --git a/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt b/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt index 89bc16fa..0778a593 100644 --- a/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt +++ b/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt @@ -63,7 +63,7 @@ internal fun String.convertXmlStringToAndroidLocalization(): String { .replace("\n", "\\n") .let { StringEscapeUtils.escapeXml11(it) } .let { - if (it[0] == '@') { + if (it.getOrNull(0) == '@') { replaceFirst("@", """\@""") } else { it