---
title: urlUserAllowed
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nscharacterset/urluserallowed
---

# urlUserAllowed

Returns the character set for characters allowed in a user URL subcomponent.

## Declaration

```swift
class var urlUserAllowed: CharacterSet { get }
```

## Discussion

Discussion The user component of a URL is an optional component that precedes the host component, and ends at either a colon (if a password is specified) or an @ sign (if no password is specified). For example, in the URL http://username:password@www.example.com/index.html, the user component is username.

## See Also

### Getting Character Sets for URL Encoding

- [urlFragmentAllowed](foundation/nscharacterset/urlfragmentallowed.md)
- [urlHostAllowed](foundation/nscharacterset/urlhostallowed.md)
- [urlPasswordAllowed](foundation/nscharacterset/urlpasswordallowed.md)
- [urlPathAllowed](foundation/nscharacterset/urlpathallowed.md)
- [urlQueryAllowed](foundation/nscharacterset/urlqueryallowed.md)
