<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Unicode/Scalar/init(_:)-2oo2e",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s7UnicodeO6ScalarVyADs5UInt8Vcfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a Unicode scalar with the specified numeric value.

```
init(_ v: UInt8)
```

## Parameters

`v`

The code point to use for the scalar.

## Discussion

For example, the following code sample creates a `Unicode.Scalar`
instance with a value of `"7"`:

```
let codepoint: UInt8 = 55
let seven = Unicode.Scalar(codepoint)
print(seven)
// Prints "7"
```

---

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)