Cicode Programming Reference > Cicode Function Categories > String Functions Introduction > StrTruncFontHnd

StrTruncFontHnd

Returns the truncated string using a particular font (specified by font number) or the specified number of characters.

Syntax

StrTruncFontHnd(sText, hFont [, iLength] [, iLengthMode])

sText:

The text to truncate

hFont:

The font handle used to calculate the pixel width of the text. (To use the default font, set to -1).

iLength:

Length of the Text to display, either in characters or pixels depending on iLengthMode (default -1, no truncation)

iLengthMode:

The length mode of the text string:

0 - Length as pixels truncated (default)

1 - Length as pixels truncated with ellipsis

2 - Length interpreted as characters.

Return Value

A truncated string or the original one.

Related Functions

StrCalcWidth, StrTruncFont, DspFont, DspFontHnd

See Also

String Functions