Skip to content

No way to portably find if OsStr has a particular prefix #22741

Closed
@codyps

Description

@codyps

This is essentially the operation provided by starts_with() on String, str, and slice.

Right now, this can only be done by either:

  • requiring the OsStr to be utf-8 (and converting it to str/String)
  • Or depending on the unix-only as_bytes() method on OsStrExt

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