# `GSFont baseName:forWildCard:`

*Instance Method*

Returns the part of a matching glyph name represented by `*` in a name pattern, or `nil` when the pattern does not contain `*` or the glyph name is shorter than the pattern.

## Declaration

```swift
func baseName(_ name: String, forWildCard wild: String) -> String?
```

```objc
- (NSString *) baseName:(NSString *) name forWildCard:(NSString *) wild;
```

```python
baseName_forWildCard_(name: str, wild: str) -> str
```

## Parameters

- `name` — A glyph name matching the pattern.
- `wild` — A name pattern containing `*`.

## See Also

### Glyph Name Queries

- [`GSFont glyphNamesForWildcard:contextLabel:error:`](/Core/GlyphsCore/GSFont/glyphNamesForWildcard:contextLabel:error:) — Returns the local glyph names matching a name query.
- [`GSFont expandWildcardsInNameList:contextLabel:error:`](/Core/GlyphsCore/GSFont/expandWildcardsInNameList:contextLabel:error:) — Expands name queries into a set of local glyph names.
- [`GSFont prepareName2Glyph`](/Core/GlyphsCore/GSFont/prepareName2Glyph) — Rebuilds the cache that maps local glyph names to glyphs.

