TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Better String Library (2015)

35 点作者 Aissen超过 2 年前

5 条评论

emmanueloga_超过 2 年前
So we have:<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;String_(computer_science)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;String_(computer_science)</a><p>--<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rope_(data_structure)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rope_(data_structure)</a><p>* <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=Ropes%2C%20an%20Alternative%20to%20Strings" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=Ropes%2C%20an%20Alternative%20...</a><p>--<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Piece_table" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Piece_table</a><p>* <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=%22Piece%20Table%22" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=%22Piece%20Table%22</a><p>--<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gap_buffer" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gap_buffer</a><p>* <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=Gap%20Buffer" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=Gap%20Buffer</a><p>--<p>Anything else? Would be nice to implement all of these as a single library!<p>What am I missing?
评论 #34075437 未加载
评论 #34075869 未加载
gnabgib超过 2 年前
Wouldn&#x27;t <a href="https:&#x2F;&#x2F;github.com&#x2F;websnarf&#x2F;bstrlib">https:&#x2F;&#x2F;github.com&#x2F;websnarf&#x2F;bstrlib</a> be a better URL?
评论 #34075081 未加载
评论 #34075249 未加载
waynecochran超过 2 年前
Not sure why it mentions C++. C++ has std::string which is far superior to this.
评论 #34082658 未加载
ape4超过 2 年前
Seems like asking for trouble to have the struct not opaque.
thurn超过 2 年前
I believe this is the same string representation Rust uses? Although in Rust the empty string is guaranteed to not allocate memory, not sure if that&#x27;s true here.