Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSCharacterSetMBS class.

NSCharacterSetMBS.alphanumericCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the categories Letters, Marks, and Numbers.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.alphanumericCharacterSet
MsgBox left(n,200) // show only first 200 chars

Informally, this set is the set of all characters used as basic units of alphabets, syllabaries, ideographs, and digits.

NSCharacterSetMBS.capitalizedLetterCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Titlecase Letters.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.capitalizedLetterCharacterSet
MsgBox n

NSCharacterSetMBS.characterSetWithBitmapRepresentation(data as MemoryBlock) as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing characters determined by a given bitmap representation.

This method is useful for creating a character set object with data from a file or other external data source.

A raw bitmap representation of a character set is a byte array of 2^16 bits (that is, 8192 bytes). The value of the bit at position n represents the presence in the character set of the character with decimal Unicode value n.

NSCharacterSetMBS.characterSetWithCharactersInString(aString as string) as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in a given string.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.characterSetWithCharactersInString("Hello World")
MsgBox n

A character set containing the characters in aString. Returns an empty character set if aString is empty.

NSCharacterSetMBS.characterSetWithContentsOfFile(aString as string) as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set read from the bitmap representation stored in the file a given path.

To read a bitmap representation from any file, use the NSData methoddataWithContentsOfFile and pass the result to characterSetWithBitmapRepresentation.

This method doesn't use filenames to check for the uniqueness of the character sets it creates. To prevent duplication of character sets in memory, cache them and make them available through an API that checks whether the requested set has already been loaded.

See also:

NSCharacterSetMBS.characterSetWithContentsOfFile(file as folderitem) as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set read from the bitmap representation stored in the file a given path.

To read a bitmap representation from any file, use the NSData.methoddataWithContentsOfFile and pass the result to characterSetWithBitmapRepresentation.

This method doesn't use filenames to check for the uniqueness of the character sets it creates. To prevent duplication of character sets in memory, cache them and make them available through an API that checks whether the requested set has already been loaded.

See also:

NSCharacterSetMBS.characterSetWithRange(r as NSRangeMBS) as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing characters with Unicode values in a given range.
Example
dim r as NSRangeMBS = NSMakeRangeMBS(asc("a"),26) // all small letters
dim n as NSCharacterSetMBS = NSCharacterSetMBS.characterSetWithRange(r)
MsgBox n

r: A range of Unicode values.

r.location is the value of the first character to return; aRange.location + r.length-1 is the value of the last.

Returns a character set containing characters whose Unicode values are given by aRange. If aRange.length is 0, returns an empty character set.

This code excerpt creates a character set object containing the lowercase English alphabetic characters:

NSCharacterSetMBS.controlCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the categories of Control or Format Characters.

These characters are specifically the Unicode values U+0000 to U+001F and U+007F to U+009F.

NSCharacterSetMBS.decimalDigitCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Decimal Numbers.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.decimalDigitCharacterSet
MsgBox n

Informally, this set is the set of all characters used to represent the decimal values 0 through 9. These characters include, for example, the decimal digits of the Indic scripts and Arabic.

NSCharacterSetMBS.decomposableCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing all individual Unicode characters that can also be represented as composed character sequences.

Returns a character set containing all individual Unicode characters that can also be represented as composed character sequences (such as for letters with accents), by the definition of "standard decomposition" in version 3.2 of the Unicode character encoding standard.

These characters include compatibility characters as well as pre-composed characters.

Note: This character set doesn't currently include the Hangul characters defined in version 2.0 of the Unicode standard.

NSCharacterSetMBS.illegalCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing values in the category of Non-Characters or that have not yet been defined in version 3.2 of the Unicode standard.

NSCharacterSetMBS.letterCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the categories Letters and Marks.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.letterCharacterSet
MsgBox n

Informally, this set is the set of all characters used as letters of alphabets and ideographs.

NSCharacterSetMBS.lowercaseLetterCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Lowercase Letters.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.lowercaseLetterCharacterSet
MsgBox n

Informally, this set is the set of all characters used as lowercase letters in alphabets that make case distinctions.

NSCharacterSetMBS.newlineCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the newline characters.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.newlineCharacterSet
MsgBox n

A character set containing the newline characters (U+000A–U+000D, U+0085).
Available in Mac OS X v10.5 and later.

NSCharacterSetMBS.nonBaseCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Marks.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.nonBaseCharacterSet
MsgBox n

This set is also defined as all legal Unicode characters with a non-spacing priority greater than 0. Informally, this set is the set of all characters used as modifiers of base characters.

NSCharacterSetMBS.punctuationCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Punctuation.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.punctuationCharacterSet
MsgBox n

Informally, this set is the set of all non-whitespace characters used to separate linguistic units in scripts, such as periods, dashes, parentheses, and so on.

NSCharacterSetMBS.symbolCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the category of Symbols.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.symbolCharacterSet
MsgBox n

These characters include, for example, the dollar sign ($) and the plus (+) sign.
Available in Mac OS X v10.3 and later.

NSCharacterSetMBS.uppercaseLetterCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing the characters in the categories of Uppercase Letters and Titlecase Letters.
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.uppercaseLetterCharacterSet
MsgBox n

Informally, this set is the set of all characters used as uppercase letters in alphabets that make case distinctions.

NSCharacterSetMBS.whitespaceAndNewlineCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing only the whitespace characters space (U+0020) and tab (U+0009) and the newline and nextline characters (U+000A–U+000D, U+0085).
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.whitespaceAndNewlineCharacterSet
MsgBox n

NSCharacterSetMBS.whitespaceCharacterSet as NSCharacterSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a character set containing only the in-line whitespace characters space (U+0020) and tab (U+0009).
Example
dim n as NSCharacterSetMBS = NSCharacterSetMBS.whitespaceCharacterSet
MsgBox n

This set doesn't contain the newline or carriage return characters.

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...