Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return same value as same Index start and end on replaceRange #5391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jaehwa-Noh
Copy link

This is replaceRange but, It does insert.
When set the same Index on start and end, it have done append CharSequence currently. But it should be nothing changed.

https://pl.kotl.in/3jc8tMz2B

fun main() {
    val origin = "123"
    val replaced = origin.replaceRange(startIndex = 1, endIndex = 1, replacement = "9")
	
    println(replaced)
    // 1923
}

When set the same Index on start and end, it have done append CharSequence currently. But it should be nothing changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants