BurntSushi/bstr

A from_str(_radix) analogue

Open

#64 aberto em 21 de jun. de 2020

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)Rust (73 forks)github user discovery
enhancementgood first issue

Métricas do repositório

Stars
 (1.070 stars)
Métricas de merge de PR
 (Mesclagem média 233d) (9 fundiu PRs em 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.

Guia do colaborador