One Logo Pool Ball
Foundation · IOS API REFERENCE

URL.FormatStyle.HostDisplayOption

struct · iOS 16.0+ · SDK 27.1

struct HostDisplayOption

Specifies the display option for displaying the host component

Members (8)

get · iOS 16.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

static · iOS 16.0+

displayWhen

TypeScript
static displayWhen(component: URL_FormatStyle_Component, requirements: Array<string>): URL_FormatStyle_HostDisplayOption
Swift declaration
static func displayWhen(_ component: URL.FormatStyle.Component, matches requirements: Set<String>) -> URL.FormatStyle.HostDisplayOption

Creates a display option to display the host if the given condition is met.

get · iOS 16.0+

omitIfHTTPFamily

TypeScript
static get omitIfHTTPFamily(): URL_FormatStyle_HostDisplayOption
Swift declaration
static var omitIfHTTPFamily: URL.FormatStyle.HostDisplayOption { get }

Creates a display option to omit the host if the URL's scheme is `http` or `https`.

static · iOS 16.0+

omitSpecificSubdomains

TypeScript
static omitSpecificSubdomainsIncludeMultiLevelSubdomainsWhenMatches(subdomainsToOmit: Array<string>, omitMultiLevelSubdomains: boolean, component: URL_FormatStyle_Component, requirements: Array<string>): URL_FormatStyle_HostDisplayOption
Swift declaration
static func omitSpecificSubdomains(_ subdomainsToOmit: Set<String> = Set(), includeMultiLevelSubdomains omitMultiLevelSubdomains: Bool = false, when component: URL.FormatStyle.Component, matches requirements: Set<String>) -> URL.FormatStyle.HostDisplayOption

Creates a display option to manipulate the subdomains of a host - Parameters: - subdomainsToOmit: specifies a set of subdomains to omit - omitMultiLevelSubdomains: if `true`, multi-level subdomains (more than two subdomains beyond the TLDs) will be omitted. - component: the component to test for condition. - requirements: the requirements for the component.

static · iOS 16.0+

omitSpecificSubdomains

TypeScript
static omitSpecificSubdomainsIncludeMultiLevelSubdomains(subdomainsToOmit?: Array<string>, omitMultiLevelSubdomains?: boolean): URL_FormatStyle_HostDisplayOption
Swift declaration
static func omitSpecificSubdomains(_ subdomainsToOmit: Set<String> = Set(), includeMultiLevelSubdomains omitMultiLevelSubdomains: Bool = false) -> URL.FormatStyle.HostDisplayOption

Creates a display option to manipulate the subdomains of a host - Parameters: - subdomainsToOmit: specifies a set of subdomains to omit - omitMultiLevelSubdomains: if `true`, multi-level subdomains (more than two subdomains beyond the TLDs) will be omitted.

get · iOS 16.0+

never

TypeScript
static get never(): URL_FormatStyle_HostDisplayOption
Swift declaration
static var never: URL.FormatStyle.HostDisplayOption { get }

Creates a display option to always omit the host.

get · iOS 16.0+

always

TypeScript
static get always(): URL_FormatStyle_HostDisplayOption
Swift declaration
static var always: URL.FormatStyle.HostDisplayOption { get }

Creates a display option to always display the host.

static · iOS 16.0+

omitWhen

TypeScript
static omitWhen(component: URL_FormatStyle_Component, requirements: Array<string>): URL_FormatStyle_HostDisplayOption
Swift declaration
static func omitWhen(_ component: URL.FormatStyle.Component, matches requirements: Set<String>) -> URL.FormatStyle.HostDisplayOption

Creates a display option to omit the host if the given condition is met.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →