Truncates an identifier for display. A Canton party id is hint::fingerprint, so the hint
survives whole and only the fingerprint shrinks, unless hint bounds it too. Anything else is
middle-truncated as one segment, never longer than the input, and cut on UTF-16 code units, so a
non-ASCII value can split a surrogate pair.
Reach for this over <Identifier> inside a sentence or another <button>, where the copy
control would nest a button in a button. Pass hint where the result must fit a bounded width.
Truncates an identifier for display. A Canton party id is
hint::fingerprint, so the hint survives whole and only the fingerprint shrinks, unlesshintbounds it too. Anything else is middle-truncated as one segment, never longer than the input, and cut on UTF-16 code units, so a non-ASCII value can split a surrogate pair.Reach for this over
<Identifier>inside a sentence or another<button>, where the copy control would nest a button in a button. Passhintwhere the result must fit a bounded width.