Method
TryFromString
static func TryFromString(text: string) -> Optional<Character>
Declaring type: Character
Module: System
Assembly: System.Runtime.dll
Source file: Character.rvn
Creates a Character when text is exactly one extended grapheme cluster.
Parameters
| Name | Type | Description |
|---|---|---|
text |
String | Non-null UTF-8 text to validate; empty or multiple graphemes return None. |
Return value
Some containing the original grapheme spelling, or None.
Remarks
Uses Unicode 17 boundaries and preserves bytes without normalization. Checks whether the first grapheme occupies the entire input; no temporary String or Character array is created. Successful construction follows the runtime's Character storage and Optional allocation rules.