javascriptwindow吧 关注:23,881贴子:28,042
  • 0回复贴,共1

关于canvas画一段不同颜色的文字

只看楼主收藏回复

怎样使用stringobject.match达到如下效果
aaa\naaaaaaa[red:[aaaaa]]aaaa\na[blue:[aaaa]]a

["aaa","aaaaaaa[red:[aaaaa]]aaaa","a[blue:[aaaa]]a"]

["aaa",["aaaaaaa",["red","aaaaa"],"aaaa"],["a",["blue","aaaa"],"a"]]


IP属地:重庆1楼2021-08-19 18:04回复