Skip to content

Commit

Permalink
refactor: cleanup codePointIndices
Browse files Browse the repository at this point in the history
  • Loading branch information
lppedd committed Feb 7, 2024
1 parent ae359e8 commit 022c13d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import kotlin.math.min
*/
public fun String.codePointIndices(): IntArray {
val (array, size) = codePointIndicesFast(this)
return if (array.size != size) {
array.copyOfRange(0, size)
} else {
array
}
return array.copyOfRange(0, size)
}

/**
Expand Down

0 comments on commit 022c13d

Please sign in to comment.