Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTextCheckingResultMBS class.

NSTextCheckingResultMBS.addressCheckingResult(Range as NSRangeMBS, components as Dictionary) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified address components.

components: A dictionary containing the address components. The dictionary keys are described in Keys for Address Components.

NSTextCheckingResultMBS.correctionCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result after detecting a possible correction.

range: The range of the detected result.
replacementString: The suggested replacement string.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeSpelling.

See also:

NSTextCheckingResultMBS.correctionCheckingResult(Range as NSRangeMBS, replacementString as String, alternativeStrings() as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result after detecting a possible correction.

range: The range of the detected result.
replacementString: The suggested replacement string.

Returns an NSTextCheckingResultMBS with the specified range and a resultType of NSTextCheckingTypeSpelling.

See also:

NSTextCheckingResultMBS.dashCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified dash corrected replacement string.

range: The range of the detected result.
replacementString: The replacement string.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeDash.

NSTextCheckingResultMBS.dateCheckingResult(Range as NSRangeMBS, date as Date, timeZone as NSTimeZoneMBS, duration as double) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates and returns a text checking result with the specified date, time zone, and duration.

range: The range of the detected result.
date: The detected date.
timeZone: The detected time zone.
duration: The detected duration.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeDate.

See also:

NSTextCheckingResultMBS.dateCheckingResult(Range as NSRangeMBS, date as DateTime, timeZone as NSTimeZoneMBS, duration as double) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified date, time zone, and duration.

range: The range of the detected result.
date: The detected date.
timeZone: The detected time zone.
duration: The detected duration.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeDate.

See also:

NSTextCheckingResultMBS.grammarCheckingResult(Range as NSRangeMBS, details() as Dictionary) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified array of grammatical errors.

range: The range of the detected result.
details: An array of details regarding the grammatical errors. This array of strings is suitable for presenting to the user.

Returns an NSTextCheckingResultMBS with the specified range and a resultType of NSTextCheckingTypeGrammar.

NSTextCheckingResultMBS.linkCheckingResult(Range as NSRangeMBS, URL as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified URL.

NSTextCheckingResultMBS.NSTextCheckingAirlineKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the components dictionary.

A key that corresponds to the airline of a transit result.

NSTextCheckingResultMBS.NSTextCheckingCityKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the city component of the address.

NSTextCheckingResultMBS.NSTextCheckingCountryKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the country component of the address.

NSTextCheckingResultMBS.NSTextCheckingFlightKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the components dictionary.
Example
// create detector for transit information
Dim types As Integer = NSTextCheckingResultMBS.NSTextCheckingTypeTransitInformation
Dim Error As NSErrorMBS
Dim DataDetector As New NSDataDetectorMBS(types, error)

Dim s As String = "Let's fly with LH444 to Atlanta!"

// look for it:
Dim m() As NSTextCheckingResultMBS = DataDetector.matches(s, 0)

// show airline
Dim r As NSTextCheckingResultMBS = m(0)

Dim dic As Dictionary = r.components
Dim Airline As String = dic.Lookup(NSTextCheckingResultMBS.NSTextCheckingAirlineKey, "?")
Dim Flight As String = dic.Lookup(NSTextCheckingResultMBS.NSTextCheckingFlightKey, "?")

MsgBox Airline+" "+Flight

A key that corresponds to the flight component of a transit result.

NSTextCheckingResultMBS.NSTextCheckingJobTitleKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the job component of the address.

NSTextCheckingResultMBS.NSTextCheckingNameKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the name component of the address.

NSTextCheckingResultMBS.NSTextCheckingOrganizationKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the organization component of the address.

NSTextCheckingResultMBS.NSTextCheckingPhoneKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the phone number component of the address.

NSTextCheckingResultMBS.NSTextCheckingStateKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the state or province component of the address.

NSTextCheckingResultMBS.NSTextCheckingStreetKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the street address component of the address.

NSTextCheckingResultMBS.NSTextCheckingZIPKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the constants to identify the possible keys returned in the addressComponents dictionary.

A key that corresponds to the zip code or postal code component of the address.

NSTextCheckingResultMBS.orthographyCheckingResult(Range as NSRangeMBS, orthography as NSOrthographyMBS) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified orthography.

range: The range of the detected result.
orthography: An orthography object that describes the script.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeOrthography.

NSTextCheckingResultMBS.phoneNumberCheckingResult(Range as NSRangeMBS, phoneNumber as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified phone number.

NSTextCheckingResultMBS.quoteCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified quote-balanced replacement string.

range: The range of the detected result.
replacementString: The replacement string.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeQuote.

NSTextCheckingResultMBS.replacementCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified replacement string.

NSTextCheckingResultMBS.spellCheckingResult(Range as NSRangeMBS) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the range of a misspelled word.

range: The range of the detected result.

Returns an NSTextCheckingResult with the specified range and a resultType of NSTextCheckingTypeSpelling.

NSTextCheckingResultMBS.transitInformationCheckingResult(Range as NSRangeMBS, components as Dictionary) as NSTextCheckingResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Regular Expressions MBS MacCocoa Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a text checking result with the specified transit information.

components: A dictionary containing the transit components. The currently supported keys are NSTextCheckingAirlineKey and NSTextCheckingFlightKey.

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


The biggest plugin in space...