IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

get_function_name

get_function_name[func_type: AnyType, //, func: func_type]() -> StaticString

Returns func's name as declared in the source code.

The returned name does not include any information about the function's parameters, arguments, or return type, just the name as declared in the source code.

Parameters:

  • func_type (AnyType): Type of func.
  • func (func_type): A mojo function.

Returns:

StaticString: The function's name as declared in the source code.