<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/strings-and-text",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Strings and Text"
}
-->

# Strings and Text

Work with text using Unicode-safe strings.

## Topics

### Strings and Characters

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

A Unicode string value that is a collection of characters.

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

A single extended grapheme cluster that approximates a user-perceived
character.

### Regular Expressions

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

A regular expression.

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

Specifies how much to attempt to match when using a quantifier.

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

A semantic level to use during regex matching.

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

A word boundary algorithm to use during regex matching.

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

The type-erased, dynamic output of a regular expression match.

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

A type that represents a regular expression.

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

### Encoding and Storage

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

A namespace for Unicode utilities.

### Compile-Time Strings

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

A string type designed to represent text that is known at compile time.



---

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)