This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/library/characterp.lgt
pmoura 75392e54c7 Logtalk 2.15.0 release files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@757 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2003-02-05 00:15:28 +00:00

123 lines
2.5 KiB
Plaintext

:- protocol(characterp).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2000/7/24,
comment is 'Character protocol.']).
:- public(is_alphanumeric/1).
:- mode(is_alphanumeric(+char), zero_or_one).
:- info(is_alphanumeric/1, [
comment is 'True if the argument is an alphanumeric character.',
argnames is ['Term']]).
:- public(is_alpha/1).
:- mode(is_alpha(+char), zero_or_one).
:- info(is_alpha/1, [
comment is 'True if the argument is a letter or an underscore.',
argnames is ['Term']]).
:- public(is_letter/1).
:- mode(is_letter(+char), zero_or_one).
:- info(is_letter/1, [
comment is 'True if the argument is a letter.',
argnames is ['Term']]).
:- public(is_bin_digit/1).
:- mode(is_bin_digit(+char), zero_or_one).
:- info(is_bin_digit/1, [
comment is 'True if the argument is a binary digit.',
argnames is ['Term']]).
:- public(is_octal_digit/1).
:- mode(is_octal_digit(+char), zero_or_one).
:- info(is_octal_digit/1, [
comment is 'True if the argument is an octal digit.',
argnames is ['Term']]).
:- public(is_dec_digit/1).
:- mode(is_dec_digit(+char), zero_or_one).
:- info(is_dec_digit/1, [
comment is 'True if the argument is a decimal digit.',
argnames is ['Term']]).
:- public(is_hex_digit/1).
:- mode(is_hex_digit(+char), zero_or_one).
:- info(is_hex_digit/1, [
comment is 'True if the argument is an hexadecimal digit.',
argnames is ['Term']]).
:- public(is_lower_case/1).
:- mode(is_lower_case(+char), zero_or_one).
:- info(is_lower_case/1, [
comment is 'True if the argument is a lower case letter.',
argnames is ['Term']]).
:- public(is_upper_case/1).
:- mode(is_upper_case(+char), zero_or_one).
:- info(is_upper_case/1, [
comment is 'True if the argument is a upper case letter.',
argnames is ['Term']]).
:- public(is_vowel/1).
:- mode(is_vowel(+char), zero_or_one).
:- info(is_vowel/1, [
comment is 'True if the argument is a vowel.',
argnames is ['Term']]).
:- public(is_layout/1).
:- mode(is_layout(+char), zero_or_one).
:- info(is_layout/1, [
comment is 'True if the argument is a layout character.',
argnames is ['Term']]).
:- public(lower_upper/2).
:- mode(lower_upper(?char, ?char), zero_or_more).
:- mode(lower_upper(+char, ?char), zero_or_one).
:- mode(lower_upper(?char, +char), zero_or_one).
:- info(lower_upper/2, [
comment is 'Converts between lower and upper case letters.',
argnames is ['Term1', 'Term2']]).
:- end_protocol.