Normalizing line endings in Ruby

后端 未结 4 891
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 04:01

I have a string in Ruby, s (say) which might have any of the standard line endings (\\n, \\r\\n, \\r). I want to convert

4条回答
  •  一个人的身影
    2020-12-29 04:32

    Try opening them on NetBeans IDE - Its asked me before, on one of the projects I've opened from elsewhere, if I wanted to fix the line endings. I think there might be a menu option to do it too, but that would be the first thing I would try.

提交回复
热议问题