Changeset 4492 for trunk/library
- Timestamp:
- 10/06/08 19:09:27 (3 months ago)
- Location:
- trunk/library
- Files:
-
- 2 modified
-
character.lgt (modified) (2 diffs)
-
characterp.lgt (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/library/character.lgt
r3687 r4492 5 5 6 6 :- info([ 7 version is 1. 0,7 version is 1.1, 8 8 author is 'Paulo Moura', 9 date is 200 0/7/24,9 date is 2008/10/7, 10 10 comment is 'Character predicates.']). 11 11 … … 65 65 66 66 is_layout(' '). 67 is_layout('\t'). 68 is_layout('\n'). 69 70 is_quote(''''). 71 is_quote('"'). 72 is_quote('`'). 73 74 is_punctation(','). 75 is_punctation(';'). 76 is_punctation(':'). 77 is_punctation('.'). 78 is_punctation('?'). 79 is_punctation('!'). 67 80 68 81 lower_upper(a, 'A'). -
trunk/library/characterp.lgt
r3687 r4492 3 3 4 4 :- info([ 5 version is 1. 0,5 version is 1.1, 6 6 author is 'Paulo Moura', 7 date is 200 0/7/24,7 date is 2008/10/7, 8 8 comment is 'Character protocol.']). 9 9 … … 12 12 :- info(is_alphanumeric/1, [ 13 13 comment is 'True if the argument is an alphanumeric character.', 14 argnames is [' Term']]).14 argnames is ['Char']]). 15 15 16 16 :- public(is_alpha/1). … … 18 18 :- info(is_alpha/1, [ 19 19 comment is 'True if the argument is a letter or an underscore.', 20 argnames is [' Term']]).20 argnames is ['Char']]). 21 21 22 22 :- public(is_letter/1). … … 24 24 :- info(is_letter/1, [ 25 25 comment is 'True if the argument is a letter.', 26 argnames is [' Term']]).26 argnames is ['Char']]). 27 27 28 28 :- public(is_bin_digit/1). … … 30 30 :- info(is_bin_digit/1, [ 31 31 comment is 'True if the argument is a binary digit.', 32 argnames is [' Term']]).32 argnames is ['Char']]). 33 33 34 34 :- public(is_octal_digit/1). … … 36 36 :- info(is_octal_digit/1, [ 37 37 comment is 'True if the argument is an octal digit.', 38 argnames is [' Term']]).38 argnames is ['Char']]). 39 39 40 40 :- public(is_dec_digit/1). … … 42 42 :- info(is_dec_digit/1, [ 43 43 comment is 'True if the argument is a decimal digit.', 44 argnames is [' Term']]).44 argnames is ['Char']]). 45 45 46 46 :- public(is_hex_digit/1). … … 48 48 :- info(is_hex_digit/1, [ 49 49 comment is 'True if the argument is an hexadecimal digit.', 50 argnames is [' Term']]).50 argnames is ['Char']]). 51 51 52 52 :- public(is_lower_case/1). … … 54 54 :- info(is_lower_case/1, [ 55 55 comment is 'True if the argument is a lower case letter.', 56 argnames is [' Term']]).56 argnames is ['Char']]). 57 57 58 58 :- public(is_upper_case/1). … … 60 60 :- info(is_upper_case/1, [ 61 61 comment is 'True if the argument is a upper case letter.', 62 argnames is [' Term']]).62 argnames is ['Char']]). 63 63 64 64 :- public(is_vowel/1). … … 66 66 :- info(is_vowel/1, [ 67 67 comment is 'True if the argument is a vowel.', 68 argnames is [' Term']]).68 argnames is ['Char']]). 69 69 70 70 :- public(is_layout/1). … … 72 72 :- info(is_layout/1, [ 73 73 comment is 'True if the argument is a layout character.', 74 argnames is ['Term']]). 74 argnames is ['Char']]). 75 76 :- public(is_quote/1). 77 :- mode(is_quote(+char), zero_or_one). 78 :- info(is_quote/1, [ 79 comment is 'True if the argument is a quote character.', 80 argnames is ['Char']]). 81 82 :- public(is_punctation/1). 83 :- mode(is_punctation(+char), zero_or_one). 84 :- info(is_punctation/1, [ 85 comment is 'True if the argument is a punctation character.', 86 argnames is ['Char']]). 75 87 76 88 :- public(lower_upper/2). … … 80 92 :- info(lower_upper/2, [ 81 93 comment is 'Converts between lower and upper case letters.', 82 argnames is [' Term1', 'Term2']]).94 argnames is ['Char1', 'Char2']]). 83 95 84 96 :- end_protocol.
