How to remove all whitespace of a string in Dart?

后端 未结 7 1960
半阙折子戏
半阙折子戏 2021-02-07 10:31

Using trim() to eliminate white space in Dart and it doesn\'t work. What am I doing wrong or is there an alternative?

       String product = \"COC         


        
7条回答
  •  深忆病人
    2021-02-07 11:20

    the Trim method just remove the leading and trailing. Use Regexp instide: Here is an example: Dart: Use regexp to remove whitespaces from string

提交回复
热议问题