startsWith method

void startsWith(
  1. Pattern other
)

Implementation

void startsWith(Pattern other) {
  context.expect(
    () => prefixFirst('starts with ', literal(other)),
    (actual) {
      if (actual.startsWith(other)) return null;
      return Rejection(
        which: prefixFirst('does not start with ', literal(other)),
      );
    },
  );
}