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

SpecialCharsToHex (deprecated)

Converts special characters to Pascal-style hexadecimal character constants.

Declaration

Source position: lazstringutils.pas line 65

function SpecialCharsToHex(

  const s: string

):string;

Arguments

s

  

Values examined and converted in the routine.

Function result

String after converting special characters to Pascal-style constants.

Description

SpecialCharsToHex is a String function used to convert special or control characters (those prior to the Space character Decimal 32) to their representation as a Pascal-style hexadecimal character constant using notation like #$1B. Other character values in s are not altered in any way.

SpecialCharsToHex calls Utf8EscapeControlChars in LazUtf8 to get the return value for the function. The value emHexPascal is passed as an argument to request hexadecimal notation in the special characters.

SpecialCharsToHex is used in the implementation of the Search Result view in the Lazarus IDE.

Remark: SpecialCharsToHex has been deprecated in Lazarus 2.1, and will be removed in Lazarus 2.3. Use the Utf8EscapeControlChars routine in LazUtf8.pas instead.

See also

Utf8EscapeControlChars

  

Translates control characters in a UTF-8-encoded string into human readable format.