Skip to content

String Conversion Predicates #21

@epage

Description

@epage

Adapters from one Item type to another would be really useful.

Example: In creating a predicate for a file, it'd be helpful to wrap a predicate on str with a predicate on [u8] that will do a from_utf8 on the variable before passing it down.

These would be exposed on a PredicateStrExt

  • .trim, .trim_left, .trim_right: trim the value before passing it to the wrapped predicate
  • .from_utf8, .from_utf8_lossy, .from_utf16, .from_utf16_lossy: Wrap a str predicate as a byte predicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions