Run Period Alignment Audit
Audit exact code-unit run boundaries against an explicit periodic grid and origin; text length itself is not an additional run boundary.
Description
Audit exact code-unit run boundaries against an explicit periodic grid and origin; text length itself is not an additional run boundary.
Run boundaries mark changes between adjacent characters. Their alignment with a period is different from the text itself being periodic.
When to use this tool
Audit exact code-unit run boundaries against an explicit periodic grid and origin; text length itself is not an additional run boundary.
- Prepare the supplied text, period, origin fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter text, period, origin. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.boundaries, result.unaligned. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
For text at most 128 UTF-16 code units, period 1 to 128 and an integer origin, collect change positions. Return those whose index minus origin is not divisible by period as unaligned.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| text | text. | Text; at most 8,192 UTF-16 code units, subject to the grammar above |
| period | period. | Integer from 1 to 128 inclusive |
| origin | origin. | Integer from -1e9 to 1e9 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.boundaries | The boundaries list in the ordering and representation described above. |
| result.unaligned | The unaligned list in the ordering and representation described above. |
{
"input": {
"text": "aabbccc",
"period": 2,
"origin": 0
},
"output": {
"result": {
"boundaries": [
2,
4
],
"unaligned": []
}
}
} Limitations and assumptions
- This checks boundary locations only. It does not establish repeating content, grapheme boundaries or a minimal string period.
- The string-analysis source text is bounded to 128 UTF-16 code units; offsets and lengths use those code units.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Use a code-point or grapheme-aware text method when the task concerns user-perceived characters. These bounded literal operations retain case and code-unit structure rather than normalizing linguistic text.
References
Similar or alternative tools
- Minimal Repeating String Period
Bounded UTF-16 string minimal repeating string period; exact code-unit matching, no Unicode normalization or grapheme inference.
- String Repetition Factor from Period
Bounded UTF-16 string string repetition factor from period; exact code-unit matching, no Unicode normalization or grapheme inference.