Instance Property

user

The user name, conforming to RFC 1808.

Declaration

var user: String? { get }

Discussion

This property contains the user name, unescaped using the replacing​Percent​Escapes(using:​) method. If the receiver’s URL does not conform to RFC 1808, this property returns nil. For example, in the URL ftp:​//username@www.example.com/, the user name is username.