TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rust: You probably meant to use .chars().count()

4 pointsby sargasabout 9 years ago

1 comment

lokedhsabout 9 years ago
Why is that what is meant? I am struggling to think of a situation where the number of characters is actually needed.<p>What you get from this call is the number of Unicode code points, which doesn&#x27;t reflect the number of &quot;characters&quot; using any common definition at all.<p>I&#x27;m concerned that misinformed advice like this will lead to even more broken implementations of things like line breaking.
评论 #11504946 未加载