Description
Slice the text using zero-based half-open UTF-16 offsets; return excerpt, code-unit length and JSON [sourceId,start,end] locator.
Acupuncture research records distinguish reporting completeness, source editions, treatment-contact labels, outcome direction and missing-outcome scenarios. These tools organize benign study or public-source metadata; they do not provide treatment instructions, locate intervention sites or determine safety or efficacy. Reporting support and clinical evidence are different questions.
Slice the text using zero-based half-open UTF-16 offsets; return excerpt, code-unit length and JSON [sourceId,start,end] locator.
When to use this tool
Use Acupuncture Public Source Location Quote Span when checking the stated benign study-record, public-source or reporting convention.
How to use the tool and how it works
- Enter text, start, end, sourceId. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read excerpt, codeUnitLength, locator. Use the output convention below.
Require nonempty sourceId and whole 0<=start<=end<=text.length. Slice the text using zero-based half-open UTF-16 offsets; return excerpt, code-unit length and JSON [sourceId,start,end] locator.1
Code points, UTF-16 code units, canonical decomposition and case conversion are different operations. This helper follows its explicit local convention rather than linguistic analysis or rendered-text measurement.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| text | Text | Required. Text; maximum UTF-16 length 8192. |
| start | Zero-based UTF-16 code-unit offset, inclusive. | Required. Safe integer; minimum 0. |
| end | Zero-based UTF-16 code-unit offset, exclusive; may split a surrogate pair. | Required. Safe integer. |
| sourceId | Source Id | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| excerpt | Excerpt | Required. Text; maximum UTF-16 length 8192. |
| codeUnitLength | Code Unit Length | Required. Safe integer. |
| locator | Locator | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"text": "abcdef",
"start": 1,
"end": 4,
"sourceId": "doc-A"
},
"output": {
"excerpt": "bcd",
"codeUnitLength": 3,
"locator": "[\"doc-A\",1,4]"
}
} Limitations and assumptions
- Offsets may split surrogate pairs; this does not validate quotation rights, source authenticity or the meaning of public location text.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the original protocol, registry, reports and appropriate complete research methods; consult qualified health professionals for actual care or clinical interpretation.
References
Similar or alternative tools
- Disclosure Character Budget Gap
Count disclosure Unicode code points and return budget-used as a signed gap.
- Public Text Tone Mark Count
Optionally NFD-decompose text, then count code points exactly matching those entries.