Method
localName
(String entity, int type)
Source from the content-addressed store, hash-verified
| 274 | } |
| 275 | |
| 276 | public static String localName(String entity, int type) { |
| 277 | int delim = entity.indexOf(':'); |
| 278 | if (delim < 0) |
| 279 | return entity; |
| 280 | String localName = entity; |
| 281 | switch (type) { |
| 282 | case ATRNAME: |
| 283 | localName = entity.substring(0, delim); |
| 284 | break; |
| 285 | case TAGNAME: |
| 286 | localName = entity.substring(delim + 1); |
| 287 | break; |
| 288 | } |
| 289 | return localName; |
| 290 | } |
| 291 | } |
Tested by
no test coverage detected