adambard / adambard/learnxinyminutes-docs
[Godot] Add pattern matching and string interpolation to GDScript's page
Open
- Dominant language
- Markdown
- Stars
- 12.3k
- Forks
- 3.7k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 6
Description
GDScript supports pattern matching in match statements:
```gdscript
match character:
var p when character is Character: print("Friend!")
var p when character is Enemy: print("Enemy!")
var p when character is NPC: print("Hi, i guess")
_: print("Nothing relevant")
```
But the page doesn't explain that. Also there is typed string interpolation and doesn't is in the page as well:
```gdscript
for i in 100:
print("%d is even?: %s" % [i, i % 2])
```
Contributor guide
Assessment
This issue has not been assessed yet.