Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for str() and other secret functions #10132

Closed
KingSupernova31 opened this issue Oct 22, 2024 · 3 comments · Fixed by godotengine/godot#98473
Closed

Add documentation for str() and other secret functions #10132

KingSupernova31 opened this issue Oct 22, 2024 · 3 comments · Fixed by godotengine/godot#98473

Comments

@KingSupernova31
Copy link

KingSupernova31 commented Oct 22, 2024

Converting a primitive value to a string is a very common need. Godot supports this with the str() function, but this is not documented anywhere I expect most users would think to look for it. It's not mentioned on the page for the String type, nor on the pages for any of the types you might want to convert from. Rather it's only mentioned on the GlobalScope page.

I would suggest that if a function is specifically relevant to certain types or classes, it should be mentioned on the page about that type/class, even if it's not actually a part of it.

@AThousandShips
Copy link
Member

AThousandShips commented Oct 22, 2024

What do you mean hidden? It's documented right here? These methods aren't secret in any way. I don't think it makes sense to mention every function that is related to each type, the str function has nothing really to do with any specific type, no more than var_to_str has

@tetrapod00
Copy link
Contributor

I don't think it's unreasonable to want str(), str_to_var(), and var_to_str() documented with the rest of the functions related to strings, on the String class ref page. But since the class reference is generated from the functions that are actually in a class, we can't randomly move functions or document them in two different places.

In this case, we could maybe add a short sentence on the String class introduction that links to these three functions?

@BrianBHuynh
Copy link
Contributor

Ahh this was from around when we were talking about it in the discord huh :o good to see the issue raised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants