Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
String (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Literal strings == {{Main|String literal}} Sometimes, strings need to be embedded inside a text file that is both human-readable and intended for consumption by a machine. This is needed in, for example, source code of programming languages, or in configuration files. In this case, the NUL character does not work well as a terminator since it is normally invisible (non-printable) and is difficult to input via a keyboard. Storing the string length would also be inconvenient as manual computation and tracking of the length is tedious and error-prone. Two common representations are: * Surrounded by [[quotation mark]]s (ASCII [[hexadecimal#Using 0β9 and AβF|0x22]] double quote <code>"str"</code> or ASCII 0x27 single quote <code>'str'</code>), used by most programming languages. To be able to include special characters such as the quotation mark itself, newline characters, or non-printable characters, [[Escape character|escape sequence]]s are often available, usually prefixed with the [[backslash]] character (ASCII 0x5C). * Terminated by a [[newline]] sequence, for example in Windows [[INI file]]s.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)