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

Clearfy the usage of String.match(expr) #10050

Open
heppocogne opened this issue Oct 5, 2024 · 0 comments · May be fixed by godotengine/godot#97863
Open

Clearfy the usage of String.match(expr) #10050

heppocogne opened this issue Oct 5, 2024 · 0 comments · May be fixed by godotengine/godot#97863
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@heppocogne
Copy link

heppocogne commented Oct 5, 2024

Your Godot version:
Godot 3.6 & Godot 4.3

Issue description:
In the current explanation, it's unclear that which string should be wildcard pattern, i.e., whether the caller or the expr argument should be. (Same for String.matchn(expr))

"abcdef".match("a?c*")   # correct
"a?c*".match("abcdef")   # wrong

Sample code or additional explanation such as "returns true if the string matches the pattern expr" would be helpful.

URL to the documentation page:
https://docs.godotengine.org/en/stable/classes/class_string.html#class-string-method-match

@skyace65 skyace65 added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
2 participants