---
title: "UTGetOSTypeFromString(_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1450472-utgetostypefromstring
---

# UTGetOSTypeFromString(_:)

Decodes a tag string into an OSType.

## Declaration

```swift
func UTGetOSTypeFromString(_ inString: CFString) -> OSType
```

## Parameters

- `inString`: A string that encodes an OSType.

## Return Value

Return Value The OSType that was encoded in the string.

## Discussion

Discussion You call this function to convert an OSType string returned by a UTI function back into the integer-based OSType.

## See Also

### Related Documentation

- [UTCreateStringForOSType(_:)](coreservices/1442804-utcreatestringforostype.md)
