MCPcopy Create free account
hub / github.com/dynjs/dynjs / trimNumericString

Method trimNumericString

src/main/java/org/dynjs/runtime/Types.java:167–179  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

165 }
166
167 public static String trimNumericString(String value) {
168 char[] val = value.toCharArray();
169
170 StringBuilder newStr = new StringBuilder();
171
172 for (int i = 0; i < val.length; ++i) {
173 if (!isWhitespace(val[i])) {
174 newStr.append(val[i]);
175 }
176 }
177
178 return newStr.toString().trim();
179 }
180
181 public static boolean isWhitespace(char c) {
182 switch (c) {

Callers 1

stringToNumberMethod · 0.95

Calls 3

isWhitespaceMethod · 0.95
appendMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected