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

Method trimOneStartingNewline

output/java8/1.4.13/Misc.java:79–83  ·  view source on GitHub ↗

Strip a single newline character from the front of s.

(String s)

Source from the content-addressed store, hash-verified

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

Callers 2

defineTemplateMethod · 0.95
defineRegionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected