# `GSGlyph isValidUnicodeString:error:`

*Type Method*

Checks whether a string uses the uppercase hexadecimal syntax for a Unicode code point.

## Declaration

```swift
class func isValidUnicodeString(_ unicode: String) throws
```

```objc
+ (BOOL) isValidUnicodeString:(NSString *) unicode error:(NSError **) error;
```

```python
isValidUnicodeString_error_(unicode: str) -> tuple[bool, NSError]
```

## Parameters

- `unicode` — The proposed Unicode code point string.
- `error` — On failure, an error describing the invalid string.

## Return Value

`YES` if the method succeeded, otherwise `NO`.

## Discussion

This does not check whether the code point is already assigned to another glyph in the font.

## See Also

### Unicode and Characters

- [`GSGlyph.unicodes`](/Core/GlyphsCore/GSGlyph/unicodes) — The Unicode code points associated with the glyph, as an ordered set of uppercase hexadecimal strings.
- [`GSGlyph countOfUnicodes`](/Core/GlyphsCore/GSGlyph/countOfUnicodes) — The number of associated Unicode code points.
- [`GSGlyph.unicode`](/Core/GlyphsCore/GSGlyph/unicode) — The first Unicode code point associated with the glyph, as an uppercase hexadecimal string.
- [`GSGlyph.unicodeChar`](/Core/GlyphsCore/GSGlyph/unicodeChar) — The numeric value of the first associated Unicode code point, or `0` when there is none.
- [`GSGlyph charString`](/Core/GlyphsCore/GSGlyph/charString) — The character for the first associated Unicode code point, or an empty string when this convenience API cannot represent it.
- [`GSGlyph addUnicode:`](/Core/GlyphsCore/GSGlyph/addUnicode:) — Adds a Unicode code point while preserving the existing code points.
- [`GSGlyph removeUnicode:`](/Core/GlyphsCore/GSGlyph/removeUnicode:) — Removes a Unicode code point while preserving the order of the remaining code points.
- [`GSGlyph setUnicodesFast:`](/Core/GlyphsCore/GSGlyph/setUnicodesFast:) — Assigns Unicode code points without updating related state.
- [`GSGlyph.baseString`](/Core/GlyphsCore/GSGlyph/baseString) — The Unicode string represented by the glyph’s character composition.

