CtypeStdc extension

Extension on Stdc to provide <ctype.h> functionality.

Importing this file attaches standard C character handling functions directly to the global stdc instance.

Note: Since Dart does not have a char type, these functions accept a String. Only the first character (code unit) of the string is evaluated.

on

Methods

isalnum(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is alphanumeric (A-Z, a-z, 0-9).
isalpha(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is alphabetic (A-Z, a-z).
isblank(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a blank character (space or tab).
iscntrl(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a control character (0x00-0x1F or 0x7F).
isdigit(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a decimal digit (0-9).
isgraph(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character has a graphical representation (any printable character except space).
islower(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a lowercase letter (a-z).
isprint(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is printable (including space).
ispunct(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a punctuation character (printable, not alphanumeric, not space).
isspace(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a white-space character. Standard white-space characters are: space (' '), form feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v').
isupper(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is an uppercase letter (A-Z).
isxdigit(String c) bool

Available on Stdc, provided by the CtypeStdc extension

Checks if the character is a hexadecimal digit (0-9, a-f, A-F).
tolower(String c) String

Available on Stdc, provided by the CtypeStdc extension

Converts an uppercase letter to its lowercase equivalent. If the character is not an uppercase letter, it is returned unchanged.
toupper(String c) String

Available on Stdc, provided by the CtypeStdc extension

Converts a lowercase letter to its uppercase equivalent. If the character is not a lowercase letter, it is returned unchanged.