JCL Help:StrEscapedToString@AnsiString

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Converts an escaped string to a string.


Pascal

 function StrEscapedToString(const S: string): string;
function StrEscapedToString(const S: AnsiString): AnsiString;


Parameters

Parameters Description
const S: string The "escaped" string to convert to a "normal" string.


Return Value

The string with all escape characters replaced with their string counterparts.


Description

StrEscapedToString converts a string which contains escape characters to a string without escape characters by replacing all escape characters with their string counterparts. For example, a string which contains a 'a' sequence will have the 'a' sequence replaced with the BELL character #7. The supported escape characters are:

Character Value Constant Description
a #7 BELL Bell
b #8 BACKSPACE Backspace
f #12 FF Form Feed
n #10 LR Line Feed
r #13 CR Carrage Return
t #9 TAB Tabulator
v #11 VT Vertical Tabulator
\ N/A N/A Backslash
" N/A N/A Double quotes


In addition it supports hexadecimal escape sequences (sequences that start with x) and octal escape sequences (sequences starting with '0', '1' ... '9'). The StrStringToEscaped is the "inverse" of this function.


See Also

StrStringToEscaped


About

Unit

JclAnsiStrings


Donator

Robert Marquardt


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page