summaryrefslogtreecommitdiff
path: root/libs/utils/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2024-11-05 22:50:56 +0100
committerJoel Klinghed <the_jk@spawned.biz>2024-11-05 23:32:18 +0100
commitd080d600d6b77b4e138918d7849c37327518da82 (patch)
tree90da35c6908de7331a0b9f3669f104cbf451050c /libs/utils/src
parent28cdab340511e948875b31ead5da30376c3b939d (diff)
Workaround kotlin & Android API 35 snafo
removeLast resolved to kotlin extension method on Android 34 and older. On 35 it resolves to a new Java method, that is API 35 only.
Diffstat (limited to 'libs/utils/src')
-rw-r--r--libs/utils/src/main/java/org/the_jk/cleversync/StringUtils.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/utils/src/main/java/org/the_jk/cleversync/StringUtils.kt b/libs/utils/src/main/java/org/the_jk/cleversync/StringUtils.kt
index 6adea24..cc00b5d 100644
--- a/libs/utils/src/main/java/org/the_jk/cleversync/StringUtils.kt
+++ b/libs/utils/src/main/java/org/the_jk/cleversync/StringUtils.kt
@@ -10,7 +10,7 @@ object StringUtils {
if (next == -1) {
if (keepEmpty || offset < input.length) {
if (limit > 0 && count == limit) {
- add("${removeLast()}${delimiter}${input.substring(offset)}")
+ add("${removeAt(lastIndex)}${delimiter}${input.substring(offset)}")
break
}
add(input.substring(offset))
@@ -19,7 +19,7 @@ object StringUtils {
}
if (keepEmpty || offset < next) {
if (limit > 0 && count == limit) {
- add("${removeLast()}${delimiter}${input.substring(offset)}")
+ add("${removeAt(lastIndex)}${delimiter}${input.substring(offset)}")
break
}
add(input.substring(offset, next))