User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function UPPER-CASE-P, LOWER-CASE-P, BOTH-CASE-P ====== ====Syntax==== * **upper-case-p** //character// → //generalized-boolean// * **lower-case-p** //character// → //generalized-boolean// * **both-case-p** //character// → //generalized-boolean// ====Arguments and Values==== * //character// - a //[[CL:Glossary:character]]//. * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. ====Description==== These functions test the case of a given //character//. **upper-case-p** returns [[CL:Glossary:true]] if //character// is an //[[CL:Glossary:uppercase]]// //[[CL:Glossary:character]]//; otherwise, returns [[CL:Glossary:false]]. **lower-case-p** returns [[CL:Glossary:true]] if //character// is a //[[CL:Glossary:lowercase]]// //[[CL:Glossary:character]]//; otherwise, returns [[CL:Glossary:false]]. **both-case-p** returns [[CL:Glossary:true]] if //character// is a //[[CL:Glossary:character]]// with //[[CL:Glossary:case]]//; otherwise, returns [[CL:Glossary:false]]. ====Examples==== <blockquote> (upper-case-p #\A) <r>//[[CL:Glossary:true]]// </r> (upper-case-p #\a) <r>//[[CL:Glossary:false]]// </r> (both-case-p #\a) <r>//[[CL:Glossary:true]]// </r> (both-case-p #\5) <r>//[[CL:Glossary:false]]// </r> (lower-case-p #\5) <r>//[[CL:Glossary:false]]// </r> (upper-case-p #\5) <r>//[[CL:Glossary:false]]// </r> ;; This next example presupposes an implementation in which #\Bell is an implementation-defined character. (lower-case-p #\Bell) <r>//[[CL:Glossary:false]]//</r> </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== Should signal an error of type type-error if //character// is not a //[[CL:Glossary:character]]//. ====See Also==== **[[CL:Functions:char-upcase|Function CHAR-UPCASE]]**, **[[CL:Functions:char-downcase|Function CHAR-DOWNCASE]]**, {\secref\CharactersWithCase}, {\secref\ImplementationDefinedScripts} ====Notes==== None.