var str3 = '''Multi
  Line
  String''';

  print( str3.splitMapJoin(
      RegExp(r'^', multiLine: true), // Matches the beginning of the line
      onMatch: (m) => '** ${m.group(0)}', // Adds asterisk to match
      onNonMatch: (n) => n // Just return non-matches
  ) ); 

/* ** Multi ** Line ** String*/

 

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2021-10-12
相关资源
相似解决方案