# Swift Optional String Or Empty Extension

July 19th, 2021 | 07:07 | E78

### Episode Summary

In this episode I walk you through how to create an extension on Optional String type to default nil strings to an empty string. This little shortcut can greatly reduce the amount of ifelsing and if let unwrapping on optional strings in your Swift codebase.

This episode's video screencast: [https://youtu.be/qzuFvUVuH9U](https://youtu.be/qzuFvUVuH9U)

This episode's audio podcast: [https://insideiosdev.com/episodes/swift-optional-string-or-empty-extension](/content/episodes/swift-optional-string-or-empty-extension/index.html)

Inside iOS Dev YouTube Channel: [https://www.youtube.com/channel/UC6zcA3dAMUWN8E2_dlg_WyQ](https://www.youtube.com/channel/UC6zcA3dAMUWN8E2_dlg_WyQ)

### Episode Notes

This episode's video screencast: [https://youtu.be/qzuFvUVuH9U](https://youtu.be/qzuFvUVuH9U)

Inside iOS Dev YouTube Channel: [https://www.youtube.com/channel/UC6zcA3dAMUWN8E2_dlg_WyQ](https://www.youtube.com/channel/UC6zcA3dAMUWN8E2_dlg_WyQ)

### Show Contributors

Alex Bush
