Skip to content

Commit

Permalink
Update encode-and-decode-strings/jdalma.kt
Browse files Browse the repository at this point in the history
Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
  • Loading branch information
jdalma and DaleSeo authored Aug 21, 2024
1 parent 3eadda0 commit b02d06f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encode-and-decode-strings/jdalma.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class `encode-and-decode-strings` {
val result = mutableListOf<String>()
while (index < string.length) {
val delimiterIndex = string.indexOf(DELIMITER, startIndex = index)
val size = string.substring(index , delimiterIndex).toInt()
val size = string.substring(index, delimiterIndex).toInt()
result.add(string.substring(delimiterIndex + 1, delimiterIndex + size + 1))
index = delimiterIndex + size + 1
}
Expand Down

0 comments on commit b02d06f

Please sign in to comment.