---
title: string
framework: system
role: symbol
role_heading: Instance Property
path: system/filepath/component/string
---

# string

Creates a string by interpreting the component’s content as UTF-8 on Unix and UTF-16 on Windows.

## Declaration

```swift
var string: String { get }
```

## Discussion

Discussion This property is equivalent to calling String(decoding: component).
