MCPcopy Index your code
hub / github.com/antlr/codebuff / trimOneStartingNewline

Method trimOneStartingNewline

output/java8/1.4.14/Misc.java:77–81  ·  view source on GitHub ↗

Strip a single newline character from the front of s.

(String s)

Source from the content-addressed store, hash-verified

75 /** Strip a single newline character from the front of {@code s}. */
76
77 public static String trimOneStartingNewline(String s) {
78 if ( s.startsWith("\r\n") ) s = s.substring(2);
79 else if ( s.startsWith("\n") ) s = s.substring(1);
80 return s;
81 }
82
83 /** Strip a single newline character from the end of {@code s}. */
84

Callers 2

defineTemplateMethod · 0.95
defineRegionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected