()
| 228 | } |
| 229 | |
| 230 | public String trim() { |
| 231 | int start = -1; |
| 232 | for (int i = 0; i < length; ++i) { |
| 233 | char c = charAt(i); |
| 234 | if (start == -1 && ! Character.isWhitespace(c)) { |
| 235 | start = i; |
| 236 | break; |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | int end = -1; |
| 241 | for (int i = length - 1; i >= 0; --i) { |
| 242 | char c = charAt(i); |
| 243 | if (end == -1 && ! Character.isWhitespace(c)) { |
| 244 | end = i + 1; |
| 245 | break; |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | if (start >= end) { |
| 250 | return ""; |
| 251 | } else { |
| 252 | return substring(start, end); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | public String toLowerCase() { |
| 257 | for (int j = 0; j < length; ++j) { |
no test coverage detected