Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSCharacterSetMBS.bitmapRepresentation as MemoryBlock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a memoryblock object encoding the receiver in binary format.
Notes:
This format is suitable for saving to a file or otherwise transmitting or archiving.
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.

Feedback, Comments & Corrections

NSCharacterSetMBS.characterIsMember(Character as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether a given character is in the receiver.
Example:
// get the Symbol font
dim n as NSFontMBS = NSFontMBS.fontWithName("Arial",10)

// what characters are defined for this font?
dim c as NSCharacterSetMBS = n.coveredCharacterSet

// is letter A part of this font?
MsgBox "A included: "+str(c.characterIsMember(asc("A")))

Feedback, Comments & Corrections

NSCharacterSetMBS.componentsSeparatedByCharactersInSet(s as string) as String()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 15.1 Yes No No Yes, macOS only No
Function: Returns an array containing substrings from the receiver that have been divided by characters in a given set.
Notes:
self: A character set containing the characters to to use to split the receiver. Must not be nil.
s: The text to process.

Returns an array of string containing substrings from the receiver that have been divided by characters in separator.

The substrings in the array appear in the order they did in the receiver. Adjacent occurrences of the separator characters produce empty strings in the result. Similarly, if the string begins or ends with separator characters, the first or last substring, respectively, is empty.

Feedback, Comments & Corrections

NSCharacterSetMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The constructor to create an empty character set.

Feedback, Comments & Corrections

NSCharacterSetMBS.copy as NSCharacterSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Creates a copy of the character set.

Feedback, Comments & Corrections

NSCharacterSetMBS.hasMemberInPlane(thePlane as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver has at least one member in a given character plane.
Notes: This method makes it easier to find the plane containing the members of the current character set. The Basic Multilingual Plane is plane 0.

Feedback, Comments & Corrections

NSCharacterSetMBS.invertedSet as NSCharacterSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a character set containing only characters that don't exist in the receiver.
Notes: Inverting an immutable character set is much more efficient than inverting a mutable character set.

Feedback, Comments & Corrections

NSCharacterSetMBS.isSupersetOfSet(theOtherSet as NSCharacterSetMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver is a superset of another given character set.
Notes:
Returns true if the receiver is a superset of theOtherSet, otherwise false.
Available in Mac OS X v10.2 and later.

Feedback, Comments & Corrections

NSCharacterSetMBS.longCharacterIsMember(theLongChar as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether a given long character is a member of the receiver.
Notes:
Returns true if theLongChar is in the receiver, otherwise false.
This method supports the specification of 32-bit characters.
Available in Mac OS X v10.2 and later.

Feedback, Comments & Corrections

NSCharacterSetMBS.mutableCopy as NSMutableCharacterSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Creates a mutable copy of the characterset.

Feedback, Comments & Corrections

NSCharacterSetMBS.Operator_Convert as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a string containing all characters in this set.
Example:
dim r as NSRangeMBS = NSMakeRangeMBS(asc("a"),26) // all small letters
dim n as NSCharacterSetMBS = NSCharacterSetMBS.characterSetWithRange(r)
MsgBox n
Notes: This way you can use a characterset directly with functions expecting a string like msgbox.

Feedback, Comments & Corrections

NSCharacterSetMBS.rangeOfCharacterFromSet(s as string, options as Integer = 0, searchRange as NSRangeMBS = nil) as NSRangeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 15.1 Yes No No Yes, macOS only No
Function: Finds and returns the range in the receiver of the first character from a given character set found in a given range with given options.
Notes:
self: A character set. This value must not be nil.
s: The text to process:
options: A mask specifying search options. The following options may be specified by combining them with bitwise OR operator: NSAnchoredSearch (8), NSBackwardsSearch (4).
searchRange: Optional, the range in which to search. The range must not exceed the bounds of the receiver.

Raises a NSException if search range is invalid.

Returns the range in the receiver of the first character found from set within search range. Returns a range of {NSNotFound, 0} if none of the characters in aSet are found.

Because pre-composed characters in set can match composed character sequences in the receiver, the length of the returned range can be greater than 1. For example, if you search for "ü" in the string "stru¨del", the returned range is {3,2}.

Special Considerations
This method detects all invalid ranges (including those with negative lengths). For applications linked against OS X v10.6 and later, this error causes an exception; for applications linked against earlier releases, this error causes a warning, which is displayed just once per application execution.

Feedback, Comments & Corrections

NSCharacterSetMBS.stringByTrimmingCharactersInSet(s as string) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 15.1 Yes No No Yes, macOS only No
Function: Returns a new string made by removing from both ends of the receiver characters contained in a given character set.
Notes:
Retruns a new string made by removing from both ends of the receiver characters contained in set. If the receiver is composed entirely of characters from set, the empty string is returned.

Use whitespaceCharacterSet or whitespaceAndNewlineCharacterSet to remove whitespace around strings.

Feedback, Comments & Corrections

NSCharacterSetMBS.StringValue as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns a string containing all characters in this set.
Example:
// get the Symbol font
dim n as NSFontMBS = NSFontMBS.fontWithName("Symbol",10)

// what characters are defined for this font?
dim c as NSCharacterSetMBS = n.coveredCharacterSet

// display a string with all the characters
MsgBox c.StringValue

Feedback, Comments & Corrections

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




Links
MBS FileMaker blog