How to place double quotes into an AnsiString

Abstract: How to place double quotes into an AnsiString

How to place double quotes into an AnsiString

  • Product Name:��C++Builder�
  • Product Version:��All
  • Product Component:��VCL�
  • Platform/OS Version:� All

    Description:

  • How can I store double quote characters (") in my AnsiString?

    Answer/Solution:

    Double quotes can be stored in an AnsiString using the \ escape sequence, like so:

    ���� AnsiString str = "The phrase \"quote this\" is inside double quotes.";

    The AnsiString shown above will display as follows:

    ���� The phrase "quote this" is inside double quotes.

    Author:� Yu-Chen Hsueh