<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDToken",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDTokenV"
  },
  "title" : "USDToken"
}
-->

# USDToken

An interned, efficiently compared string that names prims, properties, and other scene-description identifiers.

```
struct USDToken
```

## Topics

### Creating a token

[`init()`](/documentation/USDKit/USDToken/init())

[`init(String)`](/documentation/USDKit/USDToken/init(_:))

[`init(namespaceComponents: [USDToken])`](/documentation/USDKit/USDToken/init(namespaceComponents:))

Creates a namespaced token by joining `components` with `:`.

### Inspecting the token

[`var string: String`](/documentation/USDKit/USDToken/string)

[`var isEmpty: Bool`](/documentation/USDKit/USDToken/isEmpty)

[`var namespaceComponents: [USDToken]`](/documentation/USDKit/USDToken/namespaceComponents)

The token split into its namespace components, separated by `:`.

### Stripping namespaces

[`func strippingLeadingNamespace() -> USDToken`](/documentation/USDKit/USDToken/strippingLeadingNamespace())

Returns this token with its leading namespace component removed.

[`func strippingNamespacePrefix(USDToken) -> USDToken?`](/documentation/USDKit/USDToken/strippingNamespacePrefix(_:))

Returns this token with the given namespace prefix removed.

### Validating identifiers

[`static func isValidIdentifier(String, namespaced: Bool) -> Bool`](/documentation/USDKit/USDToken/isValidIdentifier(_:namespaced:))

Returns a Boolean value that indicates whether the given string is a
valid USD identifier.

## Relationships

### Conforms To

[`Value`](/documentation/USDKit/USDPrim/Attribute/Value)

[`Copyable`](/documentation/Swift/Copyable)

[`USDValueProtocol`](/documentation/USDKit/USDValueProtocol)

[`Decodable`](/documentation/Swift/Decodable)

[`Hashable`](/documentation/Swift/Hashable)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

[`Comparable`](/documentation/Swift/Comparable)

[`MetadataValue`](/documentation/USDKit/USDStage/Object/MetadataValue)

[`Encodable`](/documentation/Swift/Encodable)

[`ExpressibleByExtendedGraphemeClusterLiteral`](/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)