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


    Published on: 4/15/2007 7:04:41 PM

    Server Response from: ETNASC01

    Copyright© 1994 - 2013 Embarcadero Technologies, Inc. All rights reserved.