Description
Count and remove leading occurrences of a supplied zero symbol.
Encoded representations separate alphabet symbols, numerical digit values, byte grouping and tail padding. Recognizing one symbol or pad-bit pattern is not full payload decoding, and different alphabet variants can assign different values.
Count and remove leading occurrences of a supplied zero symbol.
When to use this tool
Use Base N Leading Zero Symbol Count when inspecting one stated alphabet, group or padding component.
How to use the tool and how it works
- Enter token, zeroSymbol. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read count, suffix. Use the output convention below.
Count and remove leading occurrences of a supplied zero symbol. Require zeroSymbol to be one Unicode code point; return count and remaining suffix using code-point iteration.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text; maximum UTF-16 length 8192. |
| zeroSymbol | Zero Symbol | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| count | Count | Required. Safe integer. |
| suffix | Suffix | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"token": "111abc",
"zeroSymbol": "1"
},
"output": {
"count": 3,
"suffix": "abc"
}
} Limitations and assumptions
- No alphabet or numeric-value equivalence is validated; removing leading symbols may alter an encoding's meaning.
- 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.
Alternative or Complementary methods
Use the complete codec matching the required alphabet and canonicality rules for real encoded data.
References
Similar or alternative tools
- Decoding: Base32 Final Symbol Pad Bits Check
Check Base32 final-symbol canonicality under an explicit tail count.
- Base32 Last Symbol Padbits
Inspect Base32 tail pad bits from a byte-count remainder.