u/WafflesAreDangerousin r/programming • Recommends
On “Strings in C - what about now, Reddit ?”
…suringly familiar, but I have no idea how you would implement most of these in O(1). I suspect people will abuse str.getAtCodeUnit(n) or the like and end up with O(n\^2) by accident, and not realise this until they pass in a massive string and find it to be dog slow.
There's some nice presentations that devle into unicode issues:
\* CppCon 2014 [video
\* CppCon 2017 [video (By comment's it seems that there's some caveats, but it has a really nice approachable presentation to convay a good baseline intuitive understanding. It also has a lot of examples of how things can go wrong, so take this as reference to what to look out for!)
\* CppCon 2019 [video (Has a good overview of the is…