string |
abbreviateString( |
[in] XStringWidth |
xStringWidth, |
| [in] long |
nWidth, |
| [in] string |
aString ); |
- Description
- Abbreviate a string, so that the resulting abbreviated string is not
wider than some given width.
The width of a string is an abstract concept here, measured via
an XStringWidth interface. Examples are the number of
characters in the string (XStringWidth will measure the
string's length), or the width in pixel when displayed with a specific
font (which XStringWidth would encapsulate).
- Parameter xStringWidth
- The interface that makes concrete the abstract notion of string width.
- Parameter nWidth
- The resulting abbreviated string's width will be no larger than this.
- Parameter aString
- The string that is abbreviated.
- Returns
- an abbreviated string.
|