How do I add double quotes to a string?

Source: Internet
Author: User


Add an escape character before double quotation marks: \ "


There are double quotes in the string, how do you say it?
For:
Before double quotes, add backslashes! \"
Example: String at+cscs= "GSM"
expressed as "at+cscs=\" gsm\ ""





--------------------------------------------------------------------------------------------------------------- -------------------------------

Escape character: \ "

The escape character is a special character constant. The escape character begins with a backslash "\" followed by one or several characters. The escape character has a specific meaning, which differs from the original meaning of the character, so it is called an "escape" character. For example, the "\ n" used in the format string of the printf function in the previous examples is an escape character, meaning "carriage return". Escape characters are primarily used to denote control codes that are not easily represented by ordinary characters.

Commonly used escape characters and their meanings

The meaning of escaping character escaping characters
\ nthe carriage return to newline.
\ t jumps horizontally to the next tab position
\v Vertical Jump Lattice
\b Backspace
\ r Enter
\f Paper Change page
\ \ backslash character "\"
\ ' Single-quote character
\a Ringing Bell
\DDD the characters represented by the number of octal digits
\xhh the characters represented by hexadecimal digits

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.