Replaces escape sequences in a string, as used within JavaScript strings, with the corresponding control characters.
Siebel7Web.bdh
SiebelDecodeJsString( inout sString : string ) : string;
Original string with escape sequences replaced by the corresponding control characters.
Parameter | Description |
---|---|
sString | Any string. |
The following two-character sequences are replaced by the corresponding control character:
"\n" replaced by a newline character
"\r" replaced by a carriage return character
"\t" replaced by a tab character
"\f" replaced by a form feed character
transaction TDecodeJs var sString : string; begin sString := "First Line\\r\\n\\tSecond line indented with tab\\r\\nThirdLine"; Writeln("Original:\n-----\n" + sString + "\n-----"); Writeln("Decoded:\n-----\n" + SiebelDecodeJsString(sString) + "\n-----"); end TDecodeJs;
Original: ----- First Line\r\n\tSecond line indented with tab\r\nThirdLine ----- Decoded: ----- First Line Second line indented with tab ThirdLine -----