当我想附加到 PHP 中的字符串或 var 时,我使用:
value = "this one";
value .= " and that one";
Run Code Online (Sandbox Code Playgroud)
我该如何在 Dart 中做到这一点?我找不到正确的文档来告诉我这一点。
我确实是在知道正确的操作员之后。
嗯,有多种方法可以做到这一点。如果你想要类似 PHP 的代码,你可以这样做:
var value = "this one";
value += " and that one";
Run Code Online (Sandbox Code Playgroud)
否则,您可以使用以下部分的建议: How to concatenate Two string in Dart?
归档时间: |
|
查看次数: |
2367 次 |
最近记录: |