Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSCharacterSetMBS class.
NSCharacterSetMBS.bitmapRepresentation as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
NSCharacterSetMBS.characterIsMember(Character as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSCharacterSetMBS.componentsSeparatedByCharactersInSet(s as string) as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSCharacterSetMBS.copy as NSCharacterSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSCharacterSetMBS.hasMemberInPlane(thePlane as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This method makes it easier to find the plane containing the members of the current character set. The Basic Multilingual Plane is plane 0.
NSCharacterSetMBS.invertedSet as NSCharacterSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Inverting an immutable character set is much more efficient than inverting a mutable character set.
NSCharacterSetMBS.isSupersetOfSet(theOtherSet as NSCharacterSetMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true if the receiver is a superset of theOtherSet, otherwise false.
Available in Mac OS X v10.2 and later.
NSCharacterSetMBS.longCharacterIsMember(theLongChar as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
NSCharacterSetMBS.mutableCopy as NSMutableCharacterSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSCharacterSetMBS.Operator_Convert as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This way you can use a characterset directly with functions expecting a string like msgbox.
NSCharacterSetMBS.rangeOfCharacterFromSet(s as string, options as Integer = 0, searchRange as NSRangeMBS = nil) as NSRangeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
NSCharacterSetMBS.stringByTrimmingCharactersInSet(s as string) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
The items on this page are in the following plugins: MBS MacBase Plugin.