GooglePlaces Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSAutocompleteMatchFragment
@interface GMSAutocompleteMatchFragment : NSObject
This 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;
-
Initializer is not available.
Declaration
Objective-C
- (nonnull instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSAutocompleteMatchFragment\u003c/code\u003e highlights contiguous characters within a string for autocompletion UI purposes.\u003c/p\u003e\n"],["\u003cp\u003eIt provides the \u003ccode\u003eoffset\u003c/code\u003e (starting position) and \u003ccode\u003elength\u003c/code\u003e of the matched fragment within the original string.\u003c/p\u003e\n"],["\u003cp\u003eThis class is intended for highlighting matched text segments and cannot be directly initialized.\u003c/p\u003e\n"]]],["`GMSAutocompleteMatchFragment` represents a substring within a larger string, designated for highlighting in autocompletion interfaces. It defines two key properties: `offset`, which indicates the starting index of the matched substring, and `length`, which specifies the number of characters in the matched fragment. The initializer is unavailable, implying that instances are created elsewhere, and not directly instantiated. These properties are accessible for read operations.\n"],null,["# GooglePlaces Framework Reference\n\nGMSAutocompleteMatchFragment\n============================\n\n @interface GMSAutocompleteMatchFragment : NSObject\n\nThis class represents a matched fragment of a string. This is a contiguous range of characters\nin a string, suitable for highlighting in an autocompletion UI.\n- `\n ``\n ``\n `\n\n ### [offset](#/c:objc(cs)GMSAutocompleteMatchFragment(py)offset)\n\n `\n ` \n The offset of the matched fragment. This is an index into a string. The character at this index\n is the first matched character. \n\n #### Declaration\n\n Swift \n\n var offset: UInt { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger offset;\n\n- `\n ``\n ``\n `\n\n ### [length](#/c:objc(cs)GMSAutocompleteMatchFragment(py)length)\n\n `\n ` \n The length of the matched fragment. \n\n #### Declaration\n\n Swift \n\n var length: UInt { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger length;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSAutocompleteMatchFragment(im)init)\n\n `\n ` \n Unavailable \n Initializer is not available. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]