Platforms to show: All Mac Windows Linux Cross-Platform
Back to CFAttributedStringMBS class.
CFAttributedStringMBS.Create(str as CFStringMBS, attributeDictionary as CFDictionaryMBS = nil) as CFAttributedStringMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | CoreFoundation | MBS MacCF Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
str: A string that specifies the characters to use in the new attributed string. This value is copied.
attributeDictionary: A dictionary that contains the attributes to apply to the new attributed string. This value is copied.
Returns an attributed string that contains the characters from str and the attributes specified by attributes. The result is nil if there was a problem in creating the attributed string.
Note that both the string and the attributes dictionary are copied. The specified attributes are applied to the whole string. If you want to apply different attributes to different ranges of the string, you should use a mutable attributed string.
CFAttributedStringMBS.CreateWithSubstring(str as CFAttributedStringMBS, range as CFRangeMBS) as CFAttributedStringMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | CoreFoundation | MBS MacCF Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
str: The attributed string to copy.
range: The range of the attributed string to copy. range must not exceed the bounds of Str.
Returns a new attributed string whose string and attributes are copied from the specified range of the supplied attributed string. Returns nil if there was a problem copying the object. Ownership follows the Create Rule.
The items on this page are in the following plugins: MBS MacCF Plugin.