Depending on what your requirements are, you might just be able to use this: while s.ends_with('\n') || s.ends_with('\r') { s.pop(); }
April 26, 2019, 2:05 p.m. - Stephan Sokolow
Depending on what your requirements are, you might just be able to use this: while s.ends_with('\n') || s.ends_with('\r') { s.pop(); }