... pattern-matching expression 模式匹配表达式 Pattern Sequences Matching 模式序列匹配 Single Pattern-matching Algorithm 单模式匹配算法 ...
基于4个网页-相关网页
你可以在任何序列匹配的最后使用这个模式来解除长度制约。
You can use this pattern at the end of any sequence match to remove length as a condition.
如果您想在一个字符序列中多次匹配一个模式,上面的代码片段是一个很好的起点。
If you want to match a pattern multiple times within a character sequence, the above code snippets are a good place to start.
而有了Scala的模式匹配,你的case可以包含类型,通配符,序列,甚至是对象变量的深度检查。
With Scala's pattern matching, your cases can include types, wild-cards, sequences, and even deep inspections of an object's variables.
应用推荐