【发布时间】:2020-10-30 15:24:34
【问题描述】:
我有一个单行代码,它删除了尾随和前导空格,并且还用一个空格替换了它们之间的多个空格。 (来自字符串)
value = value..trim()..split(" +")..join(" ");
但是我收到以下错误。
The method 'join' isn't defined for the type 'String'.
Try correcting the name to the name of an existing method, or defining a method named 'join'.(dartundefined_method)
我做错了什么?
【问题讨论】: