title: How to get string length without counting newline characters as 2 chars in Java?
body: <p>So I need the length of a string, but I want newline characters to be counter as 1 character in a string. Is there an elegant way to do this?</p>