Raw String Definition & Meaning

A raw string in programming allows all characters in a string literal to remain the same in code and in the material, rather than performing their standard programming functions. Raw strings are denoted with the letter r, or capital R, and might look something like this:

R “(hello)”

This allows characters that would otherwise trigger specific formatting to read as their literal value instead. A backslash () is a good example: these are often combined with other characters to denote a specific action in programming. Different programming languages have different patterns for raw strings, and they may have different delimiters, but most raw strings take the same general form.

Delimiters in raw strings

Raw strings avoid using escape sequences, which automatically trigger a different feature within the code (such as a paragraph break or other function). In the earlier example of a raw string: 

R “(hello)”

the parentheses or quotations can both function as delimiters, which segment string literals properly. Delimiters designate a string literal. Characters or strings that need to be separated are often parenthetical or bracketed. Different programming languages will use different delimiters, but they must delineate the separation of strings clearly. In this case, R indicates a raw string, and everything within the parentheses will read as its literal character value.

Top Articles

The Complete List of Text Abbreviations & Acronyms

From A3 to ZZZ we list 1,559 text message and online chat abbreviations to help you translate and understand today's texting lingo. Includes Top...

How to Create a Website Shortcut on Your Desktop

This Webopedia guide will show you how to create a desktop shortcut to a website using Firefox, Chrome or Internet Explorer (IE). Creating a desktop...

Windows Operating System History & Versions

The Windows operating system (Windows OS) refers to a family of operating systems developed by Microsoft Corporation. We look at the history of Windows...

Hotmail [Outlook] Email Accounts

By Vangie Beal Hotmail was one of the first public webmail services that could be accessed from any web browser. Since 2011, Hotmail, in terms...

IT Observability Definition &...

IT observability is the theory that a system's internal state should be understood...

Data Corruption Definition &...

Data corruption is the process of data becoming unreadable or invalid. It typically...

Subschema Definition & Meaning

A subschema is a database view that filters or organizes all data to...