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

StrTruncFont

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

Syntax

StrTruncFont(sText, sFont [, iLength] [, iLengthMode])

sText:

The text to truncate

sFont:

The name of the font that is used to display the text. The Font Name needs to be defined in the Fonts database. If the font is not found, the default font is used.

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, StrTruncFontHnd

See Also

String Functions