BurntSushi / BurntSushi/bstr

A from_str(_radix) analogue

Open
#64 9 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Rust
Stars
1.1k
Forks
77
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the bstr crate's existing byte-string APIs and Rust's standard integer parsing interfaces. Determine the scope of the requested from_str and from_str_radix analogues, then verify that the resulting APIs parse byte strings without requiring an initial UTF-8 conversion and cover the behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.