swift

package
v1.1.263 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Demangle added in v1.1.253

func Demangle(input string) (string, error)

Demangle returns the fully formatted Swift symbol text.

func DemangleBlob added in v1.1.253

func DemangleBlob(blob string) string

DemangleBlob replaces every mangled token in blob with its demangled equivalent.

func DemangleSimple added in v1.1.253

func DemangleSimple(input string) (string, error)

DemangleSimple returns a simplified Swift symbol name matching swift-demangle -simplified when available.

func DemangleSimpleBlob added in v1.1.253

func DemangleSimpleBlob(blob string) string

DemangleSimpleBlob replaces mangled tokens with simplified demangled text.

func DemangleType added in v1.1.253

func DemangleType(input string) (string, error)

DemangleType returns the demangled Swift type name from a mangled type string. This is specifically for type manglings found in metadata, as opposed to full symbol manglings. For example: "Si" -> "Swift.Int", "Sg" -> "Swift.Optional", etc.

NOTE: This function ALWAYS uses the pure-Go demangling engine, even on darwin. Apple's libswiftDemangle.dylib doesn't support metadata-specific encodings (e.g., I* function type signatures found in __swift5_capture sections). The CGO engine is only suitable for full symbol demangling, not type strings.

func EngineMode added in v1.1.253

func EngineMode() string

EngineMode reports which demangle engine (pure-Go or darwin-cgo) is active.

func NormalizeIdentifier added in v1.1.253

func NormalizeIdentifier(name string) string

NormalizeIdentifier attempts to demangle the provided identifier and returns the best-effort human readable string.

func TryNormalizeIdentifier added in v1.1.253

func TryNormalizeIdentifier(name string) (string, bool)

TryNormalizeIdentifier returns the demangled identifier and a boolean indicating success.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL