AI-generated Key Takeaways
-
GMSAutocompleteMatchFragmenthighlights contiguous characters within a string for autocompletion UI purposes. -
It provides the
offset(starting position) andlengthof the matched fragment within the original string. -
This class is intended for highlighting matched text segments and cannot be directly initialized.
GMSAutocompleteMatchFragment
@interface GMSAutocompleteMatchFragment : NSObjectThis class represents a matched fragment of a string. This is a contiguous range of characters in a string, suitable for highlighting in an autocompletion UI.
-
The offset of the matched fragment. This is an index into a string. The character at this index is the first matched character.
Declaration
Swift
var offset: UInt { get }Objective-C
@property (nonatomic, readonly) NSUInteger offset; -
The length of the matched fragment.
Declaration
Swift
var length: UInt { get }Objective-C
@property (nonatomic, readonly) NSUInteger length; -
Unavailable
Initializer is not available.
Declaration
Objective-C
- (nonnull instancetype)init;