SuperCollider CLASSES

Char

ascii character
Source: /Applications/SuperCollider/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Char.sc
Inherits from: Magnitude : Object

Description

Chars may be written as literals using the $ sign. For example $a, $b, $c. See Literals

Chars may be created from Integers using the methods Integer: -asAscii and Integer: -asDigit.

Class Methods

Inherited class methods

Undocumented class methods

*space

*nl

*bullet

*ff

*new

*tab

*comma

Instance Methods

conversion

-ascii

Returns:

the integer ascii value of a Char.

-digit

Returns:

an integer value from 0 to 9 for chars $0 to $9, and values 10 to 35 for chars $a to $z or $A to $Z.

-toUpper

Returns:

the upper case version of a char. Nonalphabetic chars return themselves.

-toLower

Returns:

a lower case version of a char. Nonalphabetic chars return themselves.

Testing

-isAlpha

Returns:

whether the char is an alphabetic character.

-isAlphaNum

Returns:

whether the char is an alphabetic or numeric character.

-isPrint

Returns:

whether the char is printable.

-isPunct

Returns:

whether the char is a punctuation character

-isSpace

Returns:

true if the char is white space.

-isDecDigit

Returns:

true if the char is a decimal digit $0 to $9.

-isFileSafe

Returns:

true if the char is safe for use as in a filename. excludes the path separators / and :

Discussion:

 for(0,255,{ arg i;
	var a;
	[i,a = i.asAscii,a.isAlphaNum,a.isPrint,a.isPunct,a.isControl].postln;
});

Inherited instance methods

Undocumented instance methods

-archiveAsCompileString

-isControl

-printOn (stream)

-asAscii

-asUnicode

-isPathSeparator

-storeOn (stream)

-hash

-== (aChar)

-++ (that)

-isVowel

-isUpper

-< (aChar)

-isLower