ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


new:ctype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
new:ctype [2018/02/20 19:39] korshunnew:ctype [2018/02/20 19:41] (current) korshun
Line 1: Line 1:
 ====== Character functions ====== ====== Character functions ======
  
-ACSUtils implements functions from the C programming language's [[http://www.cplusplus.com/reference/cctype/|ctype.h]].+ACSUtils implements functions from the C programming language's [[http://www.cplusplus.com/reference/cctype/|ctype.h]]. Only ASCII characters are supported.
  
  
Line 22: Line 22:
  
   * ''bool isascii(int c)'' -- returns true if the character is an ASCII character.   * ''bool isascii(int c)'' -- returns true if the character is an ASCII character.
 +
 +Character classification functions return false for all non-ASCII characters.
  
  
Line 30: Line 32:
   * ''int tolower(int c)'' -- returns the lowercase version of the character.   * ''int tolower(int c)'' -- returns the lowercase version of the character.
   * ''int toupper(int c)'' -- returns the uppercase version of the character.   * ''int toupper(int c)'' -- returns the uppercase version of the character.
 +
 +Non-ASCII characters are always returned without conversion.
  
  
Line 36: Line 40:
 These functions return true if all characters in the string match a character classification function: These functions return true if all characters in the string match a character classification function:
  
-  * ''bool StrIsASCII(str s)'' -- ''isascii''+  * ''bool StrIsAscii(str s)'' -- ''isascii''
   * ''bool StrIsAlnum(str s)'' -- ''isalnum''   * ''bool StrIsAlnum(str s)'' -- ''isalnum''
   * ''bool StrIsAlpha(str s)'' -- ''isalpha''   * ''bool StrIsAlpha(str s)'' -- ''isalpha''
new/ctype.txt · Last modified: 2018/02/20 19:41 by korshun