Bond 0.9
Bond Standard Library API Documentation
Loading...
Searching...
No Matches
type.bond

Functions for classifying and converting characters. More...

Functions

bool Bond::IsAlnum (int c)
 Returns whether a character is an ASCII alphanumeric character (i.e. a decimal digit or an upper or lower case letter).
bool Bond::IsAlpha (int c)
 Returns whether a character is an ASCII alphabetic character (i.e. an upper or lower case letter).
bool Bond::IsBlank (int c)
 Returns whether a character is an ASCII blank character (i.e. a space or a horizontal tab).
bool Bond::IsCntrl (int c)
 Returns whether a character is an ASCII control character (i.e. 0 through 31 or 127).
bool Bond::IsDigit (int c)
 Returns whether a character is an ASCII decimal digit.
bool Bond::IsGraph (int c)
 Returns whether a character is an ASCII character with a graphical representation (i.e. it is printable and is not a space).
bool Bond::IsLower (int c)
 Returns whether a character is an ASCII lower case letter.
bool Bond::IsPrint (int c)
 Returns whether a character is a printable ASCII character (i.e. a graphical character or a space).
bool Bond::IsPunct (int c)
 Returns whether a character is an ASCII punctuation character (i.e. a graphical character that is not alphanumeric).
bool Bond::IsSpace (int c)
 Returns whether a character is an ASCII whitespace character (i.e. a space, horizontal tab, newline, vertical tab, form feed or carriage return).
bool Bond::IsUpper (int c)
 Returns whether a character is an ASCII upper case letter.
bool Bond::IsXDigit (int c)
 Returns whether a character is an ASCII hexadecimal digit (i.e. the digits 0 through 9 and upper and lower case letters A through F).
int Bond::ToLower (int c)
 Returns an ASCII upper case letter converted to lower case. If the given character is not an ASCII upper case letter, it is returned unchanged.
int Bond::ToUpper (int c)
 Returns an ASCII lower case letter converted to upper case. If the given character is not an ASCII lower case letter, it is returned unchanged.

Detailed Description

Functions for classifying and converting characters.

Only ASCII characters (values 0 through 127) are classified. All other values, including the negative char values of the bytes of multi-byte UTF-8 sequences, are not members of any class and are returned unchanged by the conversion functions. The results do not depend on the locale.

include "type.bond";

Function Documentation

◆ IsAlnum()

bool Bond::IsAlnum ( int c)

Returns whether a character is an ASCII alphanumeric character (i.e. a decimal digit or an upper or lower case letter).

Parameters
cThe character to classify.

◆ IsAlpha()

bool Bond::IsAlpha ( int c)

Returns whether a character is an ASCII alphabetic character (i.e. an upper or lower case letter).

Parameters
cThe character to classify.

◆ IsBlank()

bool Bond::IsBlank ( int c)

Returns whether a character is an ASCII blank character (i.e. a space or a horizontal tab).

Parameters
cThe character to classify.

◆ IsCntrl()

bool Bond::IsCntrl ( int c)

Returns whether a character is an ASCII control character (i.e. 0 through 31 or 127).

Parameters
cThe character to classify.

◆ IsDigit()

bool Bond::IsDigit ( int c)

Returns whether a character is an ASCII decimal digit.

Parameters
cThe character to classify.

◆ IsGraph()

bool Bond::IsGraph ( int c)

Returns whether a character is an ASCII character with a graphical representation (i.e. it is printable and is not a space).

Parameters
cThe character to classify.

◆ IsLower()

bool Bond::IsLower ( int c)

Returns whether a character is an ASCII lower case letter.

Parameters
cThe character to classify.

◆ IsPrint()

bool Bond::IsPrint ( int c)

Returns whether a character is a printable ASCII character (i.e. a graphical character or a space).

Parameters
cThe character to classify.

◆ IsPunct()

bool Bond::IsPunct ( int c)

Returns whether a character is an ASCII punctuation character (i.e. a graphical character that is not alphanumeric).

Parameters
cThe character to classify.

◆ IsSpace()

bool Bond::IsSpace ( int c)

Returns whether a character is an ASCII whitespace character (i.e. a space, horizontal tab, newline, vertical tab, form feed or carriage return).

Parameters
cThe character to classify.

◆ IsUpper()

bool Bond::IsUpper ( int c)

Returns whether a character is an ASCII upper case letter.

Parameters
cThe character to classify.

◆ IsXDigit()

bool Bond::IsXDigit ( int c)

Returns whether a character is an ASCII hexadecimal digit (i.e. the digits 0 through 9 and upper and lower case letters A through F).

Parameters
cThe character to classify.

◆ ToLower()

int Bond::ToLower ( int c)

Returns an ASCII upper case letter converted to lower case. If the given character is not an ASCII upper case letter, it is returned unchanged.

Parameters
cThe character to convert.

◆ ToUpper()

int Bond::ToUpper ( int c)

Returns an ASCII lower case letter converted to upper case. If the given character is not an ASCII lower case letter, it is returned unchanged.

Parameters
cThe character to convert.