public static Matcher<Result> exact(final String exact) {
        return new Matcher<Result>() {
            @Override
            public Result matches(String input, boolean isEof) {
                return exact.equals(input)
                        ? success(input, "", input)
                        : failure(input, input.length() > exact.length());
            }

            @Override
            public String toString() {
                return generateToString("exact", exact);
            }
        };
    }
public static Matcher < Result > exact ( final String exact ) { return new Matcher < Result > ( ) { @ Override public Result matches ( String input , boolean isEof ) { return exact . equals ( input ) ? success ( input , "" , input ) : failure ( input , input . length ( ) > exact . length ( ) ) ; } @ Override public String toString ( ) { return generateToString ( "exact" , exact ) ; } } ; }
Creates a matcher that matches when the given string is equal to the
input buffer contents.
<p/>
If the result is successful, the {@link net.sf.expectit.Result#getBefore()} returns an
empty string, the {@link net.sf.expectit.Result#group()} returns the entire input buffer.

@param exact the string to match.
@return the result.