MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / add

Method add

src/main/java/org/htmlunit/html/DoTypeProcessor.java:140–148  ·  view source on GitHub ↗
(final StringBuilder newValue, final char c, final int selectionStart,
            final int selectionEnd)

Source from the content-addressed store, hash-verified

138 }
139
140 private static void add(final StringBuilder newValue, final char c, final int selectionStart,
141 final int selectionEnd) {
142 if (selectionStart == newValue.length()) {
143 newValue.append(c);
144 }
145 else {
146 newValue.replace(selectionStart, selectionEnd, Character.toString(c));
147 }
148 }
149
150 private static void add(final StringBuilder newValue, final String string, final int selectionStart,
151 final int selectionEnd) {

Callers 1

doTypeMethod · 0.95

Calls 4

lengthMethod · 0.65
appendMethod · 0.45
replaceMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected