What is the ↵–character in chrome console?

前端 未结 1 809
清酒与你
清酒与你 2020-12-14 17:05

I\'m pulling in some data from an api and console.log in chrome:

Chrome prints it like asdföklajsd↵New line!

I would like to replace the ↵ character with a

1条回答
  •  抹茶落季
    2020-12-14 17:38

    It's a return character.

    Try replacing them like this:

    myString = myString.replace(/(\r\n|\n|\r)/gm, "
    ");

    0 讨论(0)
提交回复
热议问题