89
rated 0 times
[
91]
[
2]
/ answers: 1 / hits: 17970
/ 5 Years ago, wed, february 20, 2019, 12:00:00
I'm developing an app where at some point app receives a string from Facebook Graph API.
String looks like that:
Some text some text, some text.nnMore text and morennAnd little bit more.
How can I replace nn with line break what actually works in code?
I know how to replace this with something:
var ret = stringToReplace.replace('nn','<br />');
But how can i replace it with working line break. I have tried to replace with 'n' 'rn'. Every replacement just acts like usual text. For example:
Some text some text, some text.<br />More text and more<br />And little bit more
More From » react-native