fbpx
Wikipedia

String interpolation

In computer programming, string interpolation (or variable interpolation, variable substitution, or variable expansion) is the process of evaluating a string literal containing one or more placeholders, yielding a result in which the placeholders are replaced with their corresponding values. It is a form of simple template processing[1] or, in formal terms, a form of quasi-quotation (or logic substitution interpretation). The placeholder may be a variable name, or in some languages an arbitrary expression, in either case evaluated in the current context.

String interpolation is an alternative to building string via concatenation, which requires repeat quoting and unquoting;[2] or substituting into a printf format string, where the variable is far from where it is used. Compare:

apples = 4 puts "I have #{apples} apples." # string interpolation puts "I have " + String(apples) + " apples." # string concatenation puts "I have %d apples." % apples # format string 

Two types of literal expression are usually offered: one with interpolation enabled, the other without. Non-interpolated strings may also escape sequences, in which case they are termed a raw string, though in other cases this is separate, yielding three classes of raw string, non-interpolated (but escaped) string, interpolated (and escaped) string. For example, in Unix shells, single-quoted strings are raw, while double-quoted strings are interpolated. Placeholders are usually represented by a bare or a named sigil (typically $ or %), e.g. $apples or %apples, or with braces, e.g. {apples}, sometimes both, e.g. ${apples}. In some cases additional formatting specifiers can be used (as in printf), e.g. {apples:3}, and in some cases the formatting specifiers themselves can be interpolated, e.g. {apples:width}. Expansion of the string usually occurs at run time.

Language support for string interpolation varies widely. Some languages do not offer string interpolation, instead using concatenation, simple formatting functions, or template libraries. String interpolation is common in many programming languages which make heavy use of string representations of data, such as Apache Groovy, Julia, Kotlin, Perl, PHP, Python, Ruby, Scala, Swift, Tcl and most Unix shells.

Algorithms edit

There are two main types of variable-expanding algorithms for variable interpolation:[3]

  1. Replace and expand placeholders: creating a new string from the original one, by find–replace operations. Find variable reference (placeholder), replace it by its variable value. This algorithm offers no cache strategy.
  2. Split and join string: splitting the string into an array, merging it with the corresponding array of values, then joining items by concatenation. The split string can be cached for reuse.

Security issues edit

String interpolation, like string concatenation, may lead to security problems. If user input data is improperly escaped or filtered, the system will be exposed to SQL injection, script injection, XML external entity (XXE) injection, and cross-site scripting (XSS) attacks.[4]

An SQL injection example:

query = "SELECT x, y, z FROM Table WHERE id='$id' " 

If $id is replaced with "'; DELETE FROM Table; SELECT * FROM Table WHERE id='", executing this query will wipe out all the data in Table.

Examples edit

ABAP edit

DATA(apples) = 4. WRITE |I have { apples } apples|. 

The output will be:

I have 4 apples 

Bash edit

apples=4 echo "I have $apples apples" # or echo "I have ${apples} apples" 

The output will be:

I have 4 apples 

Boo edit

apples = 4 print("I have $(apples) apples") # or print("I have {0} apples" % apples) 

The output will be:

I have 4 apples 

C# edit

var apples = 4; var bananas = 3; Console.WriteLine($"I have {apples} apples"); Console.WriteLine($"I have {apples + bananas} fruits"); 

[5]

The output will be:

I have 4 apples I have 7 fruits 

ColdFusion Markup Language edit

ColdFusion Markup Language (CFML) script syntax:

apples = 4; writeOutput("I have #apples# apples"); 

Tag syntax:

<cfset apples = 4> <cfoutput>I have #apples# apples</cfoutput> 

The output will be:

I have 4 apples 

CoffeeScript edit

apples = 4 console.log "I have #{apples} apples" 

The output will be:

I have 4 apples 

Dart edit

int apples = 4, bananas = 3; print('I have $apples apples.'); print('I have ${apples+bananas} fruits.'); 

The output will be:

I have 4 apples. I have 7 fruits. 

Go edit

As of 2022, Go does not have string interpolation. There have been some proposals for string interpolation in the next version of the language, Go 2.[6][7] Instead, Go uses printf format strings in the fmt.Sprintf function, string concatenation, or template libraries like text/template.

Groovy edit

In groovy, interpolated strings are known as GStrings:[8]

def quality = "superhero" final age = 52 def sentence = "A developer is a $quality if he is ${age <= 42 ? 'young' : 'seasoned'}" println sentence 

The output will be:

A developer is a superhero if he is seasoned 

Haxe edit

var apples = 4; var bananas = 3; trace('I have $apples apples.'); trace('I have ${apples+bananas} fruits.'); 

The output will be:[9]

I have 4 apples. I have 7 fruits. 

Java edit

As of 2022, Java does not have interpolated strings, and instead uses format functions, notably the MessageFormat class (Java version 1.1 and above) and the static method String.format (Java version 5 and above). There is a proposal to add string interpolation to the Java language. This proposal aims at doing safe string interpolation, making it easier to prevent injection attacks.

JavaScript edit

JavaScript, as of the ECMAScript 2015 (ES6) standard, supports string interpolation using backticks ``. This feature is called template literals.[10] Here is an example:

const apples = 4; const bananas = 3; console.log(`I have ${apples} apples`); console.log(`I have ${apples + bananas} fruits`); 

The output will be:

I have 4 apples I have 7 fruits 

Template literals can also be used for multi-line strings:

console.log(`This is the first line of text. This is the second line of text.`); 

The output will be:

This is the first line of text. This is the second line of text. 

Julia edit

apples = 4 bananas = 3 print("I have $apples apples and $bananas bananas, making $(apples + bananas) pieces of fruit in total.") 

The output will be:

I have 4 apples and 3 bananas, making 7 pieces of fruit in total. 

Kotlin edit

val quality = "superhero" val apples = 4 val bananas = 3 val sentence = "A developer is a $quality. I have ${apples + bananas} fruits" println(sentence) 

The output will be:

A developer is a superhero. I have 7 fruits 

Nemerle edit

def apples = 4; def bananas = 3; Console.WriteLine($"I have $apples apples."); Console.WriteLine($"I have $(apples + bananas) fruit."); 

It also supports advanced formatting features, such as:

def fruit = ["apple", "banana"]; Console.WriteLine($<#I have ..$(fruit; "\n"; f => f + "s")#>); 

The output will be:

apples bananas 

Nim edit

Nim provides string interpolation via the strutils module. Formatted string literals inspired by Python F-string are provided via the strformat module, the strformat macro verifies that the format string is well-formed and well-typed, and then are expanded into Nim source code at compile-time.

import strutils, strformat var apples = 4 var bananas = 3 echo "I have $1 apples".format(apples) echo fmt"I have {apples} apples" echo fmt"I have {apples + bananas} fruits" # Multi-line echo fmt""" I have  {apples} apples""" # Debug the formatting echo fmt"I have {apples=} apples" # Custom openChar and closeChar characters echo fmt("I have (apples) {apples}", '(', ')') # Backslash inside the formatted string literal echo fmt"""{ "yep\nope" }""" 

The output will be:

I have 4 apples I have 4 apples I have 7 fruits I have 4 apples I have apples=4 apples I have 4 {apples} yep ope 

Nix edit

let numberOfApples = "4"; in "I have ${numberOfApples} apples" 

The output will be:

I have 4 apples 

ParaSail edit

const Apples := 4 const Bananas := 3 Println ("I have `(Apples) apples.\n") Println ("I have `(Apples+Bananas) fruits.\n") 

The output will be:

I have 4 apples. I have 7 fruits. 

Perl edit

my $apples = 4; my $bananas = 3; print "I have $apples apples.\n"; print "I have @{[$apples+$bananas]} fruit.\n"; # Uses the Perl array (@) interpolation. 

The output will be:

I have 4 apples. I have 7 fruit. 

PHP edit

<?php $apples = 5; $bananas = 3; echo "There are $apples apples and $bananas bananas.\n"; echo "I have {$apples} apples and {$bananas} bananas."; 

The output will be:

There are 5 apples and 3 bananas. I have 5 apples and 3 bananas. 

Python edit

Python supports string interpolation as of version 3.6, referred to as "formatted string literals".[11][12][13] Such a literal begins with an f or F before the opening quote, and uses braces for placeholders:

apples = 4 bananas = 3 print(f'I have {apples} apples and {bananas} bananas') 

The output will be:

I have 4 apples and 3 bananas 

Ruby / Crystal edit

apples = 4 puts "I have #{apples} apples" # Format string applications for comparison: puts "I have %s apples" % apples puts "I have %{a} apples" % {a: apples} 

The output will be:

I have 4 apples 

Rust edit

Rust does not have general string interpolation, but provides similar functionality via macros, referred to as "Captured identifiers in format strings", introduced in version 1.58.0, released 2022-01-13.[14]

Rust provides formatting via the std::fmt module, which is interfaced with through various macros such as format!, write!, and print!. These macros are converted into Rust source code at compile-time, whereby each argument interacts with a formatter. The formatter supports positional parameters, named parameters, argument types, defining various formatting traits, and capturing identifiers from the environment.

let (apples, bananas) = (4, 3); // println! captures the identifiers when formatting: the string itself isn't interpolated by Rust. println!("There are {apples} apples and {bananas} bananas."); 

The output will be:

There are 4 apples and 3 bananas. 

Scala edit

Scala 2.10+ provides a general facility to allow arbitrary processing of a string literal, and supports string interpolation using the included s and f string interpolators. It is also possible to write custom ones or override the standard ones.

The f interpolator is a compiler macro that rewrites a format string with embedded expressions as an invocation of String.format. It verifies that the format string is well-formed and well-typed.

The standard interpolators edit

Scala 2.10+'s string interpolation allows embedding variable references directly in processed string literals. Here is an example:

val apples = 4 val bananas = 3 //before Scala 2.10 printf("I have %d apples\n", apples) println("I have %d apples" format apples) //Scala 2.10+ println(s"I have $apples apples") println(s"I have ${apples + bananas} fruits") println(f"I have $apples%d apples") 

The output will be:

I have 4 apples 

Sciter (tiscript) edit

In Sciter any function with name starting from $ is considered as interpolating function and so interpolation is customizable and context sensitive:

var apples = 4 var bananas = 3 var domElement = ...; domElement.$content(<p>I have {apples} apples</p>); domElement.$append(<p>I have {apples + bananas} fruits</p>); 

Where

domElement.$content(<p>I have {apples} apples</p>); 

gets compiled to this:

domElement.html = "<p>I have " + apples.toHtmlString() + " apples</p>"; 

Snobol edit

 apples = 4 ; bananas = 3 Output = "I have " apples " apples." Output = "I have " (apples + bananas) " fruits." 

The output will be:

I have 4 apples. I have 7 fruits. 

Swift edit

In Swift, a new String value can be created from a mix of constants, variables, literals, and expressions by including their values inside a string literal.[15] Each item inserted into the string literal is wrapped in a pair of parentheses, prefixed by a backslash.

let apples = 4 print("I have \(apples) apples") 

The output will be:

I have 4 apples 

Tcl edit

The Tool Command Language has always supported string interpolation in all quote-delimited strings.

set apples 4 puts "I have $apples apples." 

The output will be:

I have 4 apples. 

In order to actually format - and not simply replace - the values, there is a formatting function.

set apples 4 puts [format "I have %d apples." $apples] 

TypeScript edit

As of version 1.4, TypeScript supports string interpolation using backticks ``. Here is an example:

var apples: number = 4; console.log(`I have ${apples} apples`); 

The output will be:

I have 4 apples 

The console.log function can be used as a printf function. The above example can be rewritten, thusly:

var apples: number = 4; console.log("I have %d apples", apples); 

The output remains the same.

Visual Basic edit

As of Visual Basic 14, string interpolation is supported in Visual Basic.[16]

name = "Tom" Console.WriteLine($"Hello, {name}") 

The output will be:

Hello, Tom 

See also edit

Notes edit

  1. ^ "Enforcing Strict Model-View Separation in Template Engines", T. Parr (2004), WWW2004 conference.
  2. ^ "Interpolation in Perl". This is much tidier than repeat uses of the '.' concatenation operator.
  3. ^ "smallest-template-system/Simplest algorithms", an online tutorial for placeholder-template-systems.
  4. ^ . google-caja.googlecode.com. Archived from the original on 2012-10-19.
  5. ^ "Strings - C# Programming Guide".
  6. ^ "proposal: Go 2: string interpolation #34174". GitHub.
  7. ^ "proposal: Go 2: string interpolation evaluating to string and list of expressions #50554". GitHub.
  8. ^ "The Apache Groovy programming language - Syntax". groovy-lang.org. Retrieved 2021-06-20.
  9. ^ "Haxe - Manual - String interpolation". Haxe - The Cross-platform Toolkit. Retrieved 2017-09-12.
  10. ^ "Template literals (Template strings) - JavaScript | MDN".
  11. ^ "The Python Tutorial: 7.1.1. Formatted String Literals".
  12. ^ "The Python Language Reference: 2.4.3. Formatted string literals".
  13. ^ "PEP 498 -- Literal String Interpolation".
  14. ^ "Announcing Rust 1.58.0: Captured identifiers in format strings". 2022-01-13.
  15. ^ "Strings and Characters — The Swift Programming Language (Swift 5.5)". docs.swift.org. Retrieved 2021-06-20.
  16. ^ KathleenDollard. "Interpolated Strings - Visual Basic". docs.microsoft.com. Retrieved 2021-06-20.

string, interpolation, computer, programming, string, interpolation, variable, interpolation, variable, substitution, variable, expansion, process, evaluating, string, literal, containing, more, placeholders, yielding, result, which, placeholders, replaced, wi. In computer programming string interpolation or variable interpolation variable substitution or variable expansion is the process of evaluating a string literal containing one or more placeholders yielding a result in which the placeholders are replaced with their corresponding values It is a form of simple template processing 1 or in formal terms a form of quasi quotation or logic substitution interpretation The placeholder may be a variable name or in some languages an arbitrary expression in either case evaluated in the current context String interpolation is an alternative to building string via concatenation which requires repeat quoting and unquoting 2 or substituting into a printf format string where the variable is far from where it is used Compare apples 4 puts I have apples apples string interpolation puts I have String apples apples string concatenation puts I have d apples apples format string Two types of literal expression are usually offered one with interpolation enabled the other without Non interpolated strings may also escape sequences in which case they are termed a raw string though in other cases this is separate yielding three classes of raw string non interpolated but escaped string interpolated and escaped string For example in Unix shells single quoted strings are raw while double quoted strings are interpolated Placeholders are usually represented by a bare or a named sigil typically or e g apples or apples or with braces e g apples sometimes both e g apples In some cases additional formatting specifiers can be used as in printf e g apples 3 and in some cases the formatting specifiers themselves can be interpolated e g apples width Expansion of the string usually occurs at run time Language support for string interpolation varies widely Some languages do not offer string interpolation instead using concatenation simple formatting functions or template libraries String interpolation is common in many programming languages which make heavy use of string representations of data such as Apache Groovy Julia Kotlin Perl PHP Python Ruby Scala Swift Tcl and most Unix shells Contents 1 Algorithms 2 Security issues 3 Examples 3 1 ABAP 3 2 Bash 3 3 Boo 3 4 C 3 5 ColdFusion Markup Language 3 6 CoffeeScript 3 7 Dart 3 8 Go 3 9 Groovy 3 10 Haxe 3 11 Java 3 12 JavaScript 3 13 Julia 3 14 Kotlin 3 15 Nemerle 3 16 Nim 3 17 Nix 3 18 ParaSail 3 19 Perl 3 20 PHP 3 21 Python 3 22 Ruby Crystal 3 23 Rust 3 24 Scala 3 24 1 The standard interpolators 3 25 Sciter tiscript 3 26 Snobol 3 27 Swift 3 28 Tcl 3 29 TypeScript 3 30 Visual Basic 4 See also 5 NotesAlgorithms editThere are two main types of variable expanding algorithms for variable interpolation 3 Replace and expand placeholders creating a new string from the original one by find replace operations Find variable reference placeholder replace it by its variable value This algorithm offers no cache strategy Split and join string splitting the string into an array merging it with the corresponding array of values then joining items by concatenation The split string can be cached for reuse Security issues editString interpolation like string concatenation may lead to security problems If user input data is improperly escaped or filtered the system will be exposed to SQL injection script injection XML external entity XXE injection and cross site scripting XSS attacks 4 An SQL injection example query span class k SELECT span span class w span span class n x span span class p span span class w span span class n y span span class p span span class w span span class n z span span class w span span class k FROM span span class w span span class k Table span span class w span span class k WHERE span span class w span span class n id span span class o span span class s1 id span If id is replaced with code class mw highlight mw highlight lang sql mw content ltr id style dir ltr span class k DELETE span span class w span span class k FROM span span class w span span class k Table span span class p span span class w span span class k SELECT span span class w span span class o span span class w span span class k FROM span span class w span span class k Table span span class w span span class k WHERE span span class w span span class n id span span class o span span class err span code executing this query will wipe out all the data in Table Examples editABAP edit Main article ABAP DATA apples 4 WRITE I have apples apples The output will be I have 4 apples Bash edit Main article Bash Unix shell apples 4 echo I have apples apples or echo I have apples apples The output will be I have 4 apples Boo edit Main article Boo programming language apples 4 print I have apples apples or print I have 0 apples apples The output will be I have 4 apples C edit Main article C Sharp programming language var apples 4 var bananas 3 Console WriteLine I have apples apples Console WriteLine I have apples bananas fruits 5 The output will be I have 4 apples I have 7 fruits ColdFusion Markup Language edit Main article ColdFusion Markup Language ColdFusion Markup Language CFML script syntax apples 4 writeOutput I have apples apples Tag syntax lt cfset apples 4 gt lt cfoutput gt I have apples apples lt cfoutput gt The output will be I have 4 apples CoffeeScript edit Main article CoffeeScript apples 4 console log I have apples apples The output will be I have 4 apples Dart edit Main article Dart programming language int apples 4 bananas 3 print I have apples apples print I have apples bananas fruits The output will be I have 4 apples I have 7 fruits Go edit Main article Go programming language As of 2022 update Go does not have string interpolation There have been some proposals for string interpolation in the next version of the language Go 2 6 7 Instead Go uses printf format strings in the fmt Sprintf function string concatenation or template libraries like text template Groovy edit Main article Groovy programming language In groovy interpolated strings are known as GStrings 8 def quality superhero final age 52 def sentence A developer is a quality if he is age lt 42 young seasoned println sentence The output will be A developer is a superhero if he is seasoned Haxe edit Main article Haxe var apples 4 var bananas 3 trace I have apples apples trace I have apples bananas fruits The output will be 9 I have 4 apples I have 7 fruits Java edit Main article Java programming language As of 2022 update Java does not have interpolated strings and instead uses format functions notably the MessageFormat class Java version 1 1 and above and the static method String format Java version 5 and above There is a proposal to add string interpolation to the Java language This proposal aims at doing safe string interpolation making it easier to prevent injection attacks JavaScript edit Main article JavaScript JavaScript as of the ECMAScript 2015 ES6 standard supports string interpolation using backticks This feature is called template literals 10 Here is an example const apples 4 const bananas 3 console log I have apples apples console log I have apples bananas fruits The output will be I have 4 apples I have 7 fruits Template literals can also be used for multi line strings console log This is the first line of text This is the second line of text The output will be This is the first line of text This is the second line of text Julia edit Main article Julia programming language apples 4 bananas 3 print I have apples apples and bananas bananas making apples bananas pieces of fruit in total The output will be I have 4 apples and 3 bananas making 7 pieces of fruit in total Kotlin edit Main article Kotlin programming language val quality superhero val apples 4 val bananas 3 val sentence A developer is a quality I have apples bananas fruits println sentence The output will be A developer is a superhero I have 7 fruits Nemerle edit Main article Nemerle def apples 4 def bananas 3 Console WriteLine I have apples apples Console WriteLine I have apples bananas fruit It also supports advanced formatting features such as def fruit apple banana Console WriteLine lt I have fruit n f gt f s gt The output will be apples bananas Nim edit Main article Nim programming language Nim provides string interpolation via the strutils module Formatted string literals inspired by Python F string are provided via the strformat module the strformat macro verifies that the format string is well formed and well typed and then are expanded into Nim source code at compile time import strutils strformat var apples 4 var bananas 3 echo I have 1 apples format apples echo fmt I have apples apples echo fmt I have apples bananas fruits Multi line echo fmt I have apples apples Debug the formatting echo fmt I have apples apples Custom openChar and closeChar characters echo fmt I have apples apples Backslash inside the formatted string literal echo fmt yep nope The output will be I have 4 apples I have 4 apples I have 7 fruits I have 4 apples I have apples 4 apples I have 4 apples yep ope Nix edit Main article Nix package manager let numberOfApples 4 in I have numberOfApples apples The output will be I have 4 apples ParaSail edit Main article ParaSail programming language const Apples 4 const Bananas 3 Println I have Apples apples n Println I have Apples Bananas fruits n The output will be I have 4 apples I have 7 fruits Perl edit Main article Perl my apples 4 my bananas 3 print I have apples apples n print I have apples bananas fruit n Uses the Perl array interpolation The output will be I have 4 apples I have 7 fruit PHP edit Main article PHP lt php apples 5 bananas 3 echo There are apples apples and bananas bananas n echo I have apples apples and bananas bananas The output will be There are 5 apples and 3 bananas I have 5 apples and 3 bananas Python edit Main article Python programming language Python supports string interpolation as of version 3 6 referred to as formatted string literals 11 12 13 Such a literal begins with an f or F before the opening quote and uses braces for placeholders apples 4 bananas 3 print f I have apples apples and bananas bananas The output will be I have 4 apples and 3 bananas Ruby Crystal edit Main article Ruby programming language Main article Crystal programming language apples 4 puts I have apples apples Format string applications for comparison puts I have s apples apples puts I have a apples a apples The output will be I have 4 apples Rust edit Main article Rust programming language Rust does not have general string interpolation but provides similar functionality via macros referred to as Captured identifiers in format strings introduced in version 1 58 0 released 2022 01 13 14 Rust provides formatting via the std fmt module which is interfaced with through various macros such as format write and print These macros are converted into Rust source code at compile time whereby each argument interacts with a formatter The formatter supports positional parameters named parameters argument types defining various formatting traits and capturing identifiers from the environment let apples bananas 4 3 println captures the identifiers when formatting the string itself isn t interpolated by Rust println There are apples apples and bananas bananas The output will be There are 4 apples and 3 bananas Scala edit Main article Scala programming language Scala 2 10 provides a general facility to allow arbitrary processing of a string literal and supports string interpolation using the included s and f string interpolators It is also possible to write custom ones or override the standard ones The f interpolator is a compiler macro that rewrites a format string with embedded expressions as an invocation of String format It verifies that the format string is well formed and well typed The standard interpolators edit Scala 2 10 s string interpolation allows embedding variable references directly in processed string literals Here is an example val apples 4 val bananas 3 before Scala 2 10 printf I have d apples n apples println I have d apples format apples Scala 2 10 println s I have apples apples println s I have apples bananas fruits println f I have apples d apples The output will be I have 4 apples Sciter tiscript edit In Sciter any function with name starting from is considered as interpolating function and so interpolation is customizable and context sensitive var apples 4 var bananas 3 var domElement domElement content lt p gt I have apples apples lt p gt domElement append lt p gt I have apples bananas fruits lt p gt WheredomElement content lt p gt I have apples apples lt p gt gets compiled to this domElement html lt p gt I have apples toHtmlString apples lt p gt Snobol edit Main article SNOBOL apples 4 bananas 3 Output I have apples apples Output I have apples bananas fruits The output will be I have 4 apples I have 7 fruits Swift edit Main article Swift programming language In Swift a new String value can be created from a mix of constants variables literals and expressions by including their values inside a string literal 15 Each item inserted into the string literal is wrapped in a pair of parentheses prefixed by a backslash let apples 4 print I have apples apples The output will be I have 4 apples Tcl edit Main article Tcl The Tool Command Language has always supported string interpolation in all quote delimited strings set apples 4 puts I have apples apples The output will be I have 4 apples In order to actually format and not simply replace the values there is a formatting function set apples 4 puts format I have d apples apples TypeScript edit Main article TypeScript As of version 1 4 TypeScript supports string interpolation using backticks Here is an example var apples number 4 console log I have apples apples The output will be I have 4 apples The console log function can be used as a printf function The above example can be rewritten thusly var apples number 4 console log I have d apples apples The output remains the same Visual Basic edit As of Visual Basic 14 string interpolation is supported in Visual Basic 16 name Tom Console WriteLine Hello name The output will be Hello TomSee also editConcatenation Improper input validation printf format string Quasi quotation String literal SubstitutionNotes edit Enforcing Strict Model View Separation in Template Engines T Parr 2004 WWW2004 conference Interpolation in Perl This is much tidier than repeat uses of the concatenation operator smallest template system Simplest algorithms an online tutorial for placeholder template systems Secure String Interpolation google caja googlecode com Archived from the original on 2012 10 19 Strings C Programming Guide proposal Go 2 string interpolation 34174 GitHub proposal Go 2 string interpolation evaluating to string and list of expressions 50554 GitHub The Apache Groovy programming language Syntax groovy lang org Retrieved 2021 06 20 Haxe Manual String interpolation Haxe The Cross platform Toolkit Retrieved 2017 09 12 Template literals Template strings JavaScript MDN The Python Tutorial 7 1 1 Formatted String Literals The Python Language Reference 2 4 3 Formatted string literals PEP 498 Literal String Interpolation Announcing Rust 1 58 0 Captured identifiers in format strings 2022 01 13 Strings and Characters The Swift Programming Language Swift 5 5 docs swift org Retrieved 2021 06 20 KathleenDollard Interpolated Strings Visual Basic docs microsoft com Retrieved 2021 06 20 Retrieved from https en wikipedia org w index php title String interpolation amp oldid 1166012877, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.