[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'LazStringUtils' (#lazutils)

BeautifyLineXY

Combines and optionally shortens the specified values.

Declaration

Source position: lazstringutils.pas line 65

function BeautifyLineXY(

  const Filename: string;

  const Line: string;

  X: Integer;

  Y: Integer

):string;

Arguments

Filename

  

File name used at the start of the formatted message.

Line

  

Contains the context for the formatted message.

X

  

Line number for the message context.

Y

  

Column number for the message context.

Function result

Formatted message using the specified values.

Description

BeautifyLineXY is a String function used to combine the values in the Filename, Line, X and Y arguments into a formatted message. The message is in the form:

examplefile.pas (123, 1) The error message goes here.

Filename contains a file name used at the start of the formatted message.

X represents the line number in the context for the message.

Y represents the column number in the context for the message.

Line contains the context for the formatted message. The ShortDotsLine routine is called to shorten and "ellipsify" the message in Line when needed.

BeautifyLineXY is used in the implementation of Jump History and Search Result views in the Lazarus IDE.

See also

ShortDotsLine

  

Shortens and "ellipsifies" the specified value.

MaxTextLen

  

Defines the maximum length for shortened or "ellipsified" text.


Version 4.0 Generated 2025-05-03 Home