Description
Return a message's length and budget remainder.
Communication measurements need an explicit event origin, clock correction, count unit and exposure denominator. Timing and coverage records can be summarized without detecting actual speech, verifying message delivery or determining readability, accessibility or communication quality.
Return a message's length and budget remainder.
When to use this tool
Use Message Character Budget Gap when checking the stated communication timing, rate, representation or coverage convention.
How to use the tool and how it works
- Enter message, limit, countCodePoints. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read used, remaining. Use the output convention below.
Return a message's length and budget remainder. Require nonnegative whole limit; used counts Unicode code points when countCodePoints, otherwise UTF-16 code units; remaining = limit-used.1
UTF-8 bytes, UTF-16 code units and Unicode code points are distinct; grapheme boundaries need separate treatment.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| message | Message | Required. Text; maximum UTF-16 length 8192. |
| limit | Limit | Required. Safe integer; minimum 0. |
| countCodePoints | Count Code Points | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| used | Used | Required. Safe integer. |
| remaining | Budget minus use under the stated direction, retaining negative deficits where allowed. | Required. Safe integer. |
{
"input": {
"message": "A🚀",
"limit": 4,
"countCodePoints": true
},
"output": {
"used": 2,
"remaining": 2
}
} Limitations and assumptions
- Neither count is a grapheme count, byte budget or rendered width; no transport-specific segmentation is performed.
- 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 actual synchronized media/message records, appropriate text measurement and user evaluation for complete communication or accessibility assessment.
References
-
Calculation and input contract: communication/message-character-budget-gap — tool.io
-
Unicode 17.0: conformance and encoding forms — Unicode Consortium
Similar or alternative tools
- Message Segmentation Overhead Budget
Return segmented-message overhead under a supplied payload capacity.
- Subtitle Two Speaker Line Budget
Compare two speaker-line character counts with a supplied limit.