JavaScript Newline Character -


from this question, ...

lines = foo.value.split(/\r\n|\r|\n/); 

is 1 way split string, how join newlines?

also, wonder if linux uses whichever newline character, switch windows, won't web app break? newlines become not recognized? or maybe browser conversion?

split on /\r?\n/, in case string includes carriage returns newlines.

join '\n', in browser , os.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -