Seriously, why replacing a single function with a ...
# stdlib
h
Seriously, why replacing a single function with a very long complex construct?😕
e
it's complex because the deprecated function has hidden complexity
if you don't care about following the current locale then just use
.replaceFirstChar { it.titlecase() }
, it will have some different behavior but is more predictable
h
Thanks. I could do that, but I wonder this is not part of stdlib (as it was before)?
e
https://youtrack.jetbrains.com/issue/KT-43023 the goal seems to be: because different users have different expectations for it, it should be explicitly coded
👍 1
f
There was a long discussion on the KEEP of this, the gist really is: working with text isn't as simple as it seems. 😉
h
Ah, thanks for the pointer.
e
working with anything human-related (locales, times, countries, names, addresses, etc.) is never as simple as it seems
💯 7
j
I tried to summarize the responses from JetBrains about this in this SO answer a few months ago: https://stackoverflow.com/a/67845025/1540818
👍 2
👍🏿 1