Skip to content

Suggestion: Add bit_array.to_lossy_string() or similar #797

Open
@JonasHedEng

Description

@JonasHedEng

There is currently no way to (easily) convert from a BitArray that contains non-UTF codepoints to a String.
This is usable when, for example, you need to handle filepaths and you're not concerned with the exact naming but want a best-effort conversion.

In Rust there's OsStr and Path-derivations for this. One first step could be to implement something like Rust's to_string_lossy

fn to_lossy_string(bytes: BitArray) -> String {
    todo
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions