---
title: "hasPrefix(_:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdlayer/path/hasprefix(_:)"
---

# hasPrefix(_:)

Returns a Boolean value that indicates whether this path begins with prefix.

## Declaration

```swift
func hasPrefix(_ prefix: USDLayer.Path) -> Bool
```

## Parameters

- `prefix`: The candidate prefix path.

## Return Value

Return Value true if this path is rooted at prefix; otherwise, false.
