I need to remove newlines at the beginning and at the end of a string in ruby (some sort of trimming).
But JUST at the beginning and the end... The new lines located in the middle of the string must …
I have a string variable with content:
varMessage =
"hi/thsid/sdfhsjdf/dfjsd/sdjfsdn\n"
"/my/name/is/balaji.so\n"
"call::myFunction(int const&)\n"
"void::secondFunction(char const&)\n"
.
.
.
"this/is/last/line/liobrary.so"
In the …