Skip to content

cotrInterpolate

Interpolates a string

Aliases:

  • cotrInterpolate
  • interpolate
  • variableExpansion
  • variableSubstitution
  • stringPlaceholders
  • stringInterpolation

cpp

std::string myString = "Your message here";

csharp

"Your string here"

dart

'Your string here \${variable}'

go

`string`

haskell

show variable

java

String.format("%s", value)

javascript

let text = `Hello, name!`;

javascriptreact

let text = `Hello, name!`;

kotlin

"Your message here"

perl

"Your string herevariable"

php

'Your string here \${variable}'

powershell

Terminal window
"Your string herevariable"

python

f"Your message here"

r

paste0("Your string here ", variable)

ruby

"Your string here \#{variable}"

rust

format!("Your message here")

scala

s"Your string here \${variable}"

shellscript

Terminal window
# Bash uses double quotes for variable interpolation:
echo "Hello, name!"

swift

"\(variable)"

typescript

`Hello, name!`

typescriptreact

`Hello, name!`