Description
Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.
A unit label is text describing a quantity's intended scale. Joining tokens, adding powers or choosing spacing changes presentation; it does not convert the quantity, validate dimensional compatibility or verify a unit registry entry.
Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.
When to use this tool
Use Interval Endpoint Unit Sharing Flag when you need a specific quantity-and-unit text convention.
How to use the tool and how it works
- Enter leftUnit, rightUnit, shareRequested. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read canShare, suffix. Inspect canShare before interpreting the associated values.
Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| leftUnit | Left Unit | Required. Text; maximum UTF-16 length 8192. |
| rightUnit | Right Unit | Required. Text; maximum UTF-16 length 8192. |
| shareRequested | Share Requested | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| canShare | Can Share Unit: 1. | Required. Boolean. |
| suffix | Shared literal unit or empty placeholder; inspect canShare. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"leftUnit": "m",
"rightUnit": "m",
"shareRequested": true
},
"output": {
"canShare": true,
"suffix": "m"
}
} Limitations and assumptions
- An empty suffix can be an actual empty matching unit or a false-case placeholder. Literal equality does not establish physical unit equivalence.
- 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 a unit-aware calculation for actual conversion and dimensional checks. Select a destination-appropriate typography and retain the intended unit meaning when preparing labels.
References
Similar or alternative tools
- Measurement Uncertainty Parenthesis Unit Gap
Compare valueUnit and uncertaintyUnit literally; return a shared-unit suffix when equal or an explicit separate-unit suffix otherwise.
- Measurement Unit Product Dot Policy
Join tokens with a middle dot or ordinary space.