BurntSushi/bstr

A from_str(_radix) analogue

开放

#64 创建于 2020年6月21日

 (9 条评论) (0 个反应) (0 位负责人)Rust (73 个派生)github user discovery
enhancementgood first issue

仓库指标

星标
 (1,070 个星标)
PR 合并指标
 (平均合并 233天) (30 天内合并 9 个 PR)

描述

Working with mostly-UTF-8 byte strings, the two biggest things my current project is missing are substring matching (which this crate provides) and integer parsing (which std provides only for str).

This is easily worked around by calling str::from_utf8 first, because if the input is not valid UTF-8 then it would never make it through a from_str/parse or from_str_radix anyway.

But it would be convenient to have these functions in bstr as well, to avoid the overhead from that redundant from_utf8 call.

贡献者指南