Transform Windows-style newlines to Unix-style newlines

2019-06-19 20:03栏目:技术创新

'Line onenrLine twonr'.gsub('nr', 'n')

# => 'Line onenLine twon'

#Transform all runs of whitespace into a single space character
'nrThis stringtttusesn alltsortsnof whitespace.'.gsub(/s /, ' ')
# => ' This string uses all sorts of whitespace.'

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:Transform Windows-style newlines to Unix-style newlines