adambard / adambard/learnxinyminutes-docs
[Godot] Add pattern matching and string interpolation to GDScript's page
- 主要语言
- Markdown
- 星标
- 12.3k
- 派生
- 3.7k
- 平均合并
- 13 小时 10 分钟
- 30 天内合并 PR
- 6
描述
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])
```
贡献指南
调研方向
Open the repository's GDScript page and review the existing language-feature sections around match statements and strings. Add coverage for the two behaviors shown in the issue, keeping the examples and explanations consistent with the page; done means both features are documented clearly on that page.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- markdown
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 78/100