MCPcopy Create free account
hub / github.com/BaseXdb/basex / string

Method string

basex-core/src/main/java/org/basex/query/value/item/GDt.java:100–116  ·  view source on GitHub ↗
(final InputInfo ii)

Source from the content-addressed store, hash-verified

98 }
99
100 @Override
101 public byte[] string(final InputInfo ii) {
102 final TokenBuilder tb = new TokenBuilder();
103 if(year == Long.MAX_VALUE) {
104 tb.add('-');
105 } else {
106 if(year < 0) tb.add('-');
107 prefix(tb, Math.abs(yea()), 4);
108 }
109 if(month >= 0 || day >= 0) tb.add('-');
110 if(month >= 0) prefix(tb, month + 1, 2);
111 if(day >= 0) tb.add('-');
112 if(day >= 0) prefix(tb, day + 1, 2);
113
114 zone(tb);
115 return tb.finish();
116 }
117}

Callers

nothing calls this directly

Calls 6

addMethod · 0.95
finishMethod · 0.95
zoneMethod · 0.80
prefixMethod · 0.45
absMethod · 0.45
yeaMethod · 0.45

Tested by

no test coverage detected