rpmatch(3)

rpmatch3

Determine whether the response to a question is affirmative or negative

Usage

#include <stdlib.h>

int

rpmatch(const char *response);

Library

Standard C Library (libc, -lc)

Overview

The rpmatch() function determines whether the response argument is an affirmative or negative response to a question according to the current locale.

Return values

The rpmatch() functions returns:

1

The response is affirmative.

0

The response is negative.

-1

The response is not recognized.

Releases

Unchanged in 45 releases since macOS 10.15.

  1. 10.15–26.5

History

The rpmatch() function appeared in macOS 10.15.

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.