Description
Start sentinel at a nonempty prefix and append underscores until no values entry starts with it.
Text positions can be measured in UTF-16 code units, Unicode code points, grapheme clusters, or modeled display columns. These coordinates are not interchangeable. Invisible markers and delimiter policies can also affect interpretation even when a string looks unchanged, so the chosen representation needs to stay explicit.
Start sentinel at a nonempty prefix and append underscores until no values entry starts with it.
When to use this tool
Use String Prefix Collision Sentinel Choice when you need the stated marker, coordinate, delimiter, or normalization operation under an explicit text representation.
How to use the tool and how it works
- Enter values, prefix. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sentinel, added. Use the output convention below.
Start sentinel at a nonempty prefix and append underscores until no values entry starts with it. Return sentinel and the number added.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| values | Values | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| prefix | Prefix | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sentinel | Sentinel | Required. Text; maximum UTF-16 length 8192. |
| added | Added | Required. Safe integer. |
{
"input": {
"values": [
"_x",
"__y"
],
"prefix": "_"
},
"output": {
"sentinel": "___",
"added": 2
}
} Limitations and assumptions
- Collision means prefix matching, not exact equality. Input and output budgets still apply; the result is not a parser-safe escape or a globally unique token beyond the supplied values.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
Alternative or Complementary methods
Choose the coordinate system required by the consumer. Use a full parser, renderer, or segmentation method when a local marker or delimiter rule cannot determine the complete text behavior.
References
Similar or alternative tools
- Line Prefix Common Indent
Find a literal common space/tab prefix without expanding tabs or excluding blank lines.
- String Literal Delimiter Minimum Fence
Choose a uniform delimiter fence longer than every run of that delimiter in the supplied text.