AgelessEssence
AgelessEssence

Reputation: 6741

how string custom processing by "special characters" is called in programming?

In programming, strings like these

$stringA="[[f9.heart]]"; // facebook replaces it with heart image
$stringB="%%VARNAME%%"; // set var value into a template system

are defined to have a special processing (set by the developers). What is the correct computer term to refer them as? (when making internet research)

If someone knows a link to good-practices, recommendations etc for PHP, please post them! Thanks.

Upvotes: 2

Views: 130

Answers (1)

sehe
sehe

Reputation: 393674

This is an extremely common thing and has many names in different contexts.

I can think of

  • variable expansion (shell scripting)
  • macro expansion, substitution variables (other scripts)
  • escape sequences (tangentially)
  • template expansion/template text generation (document generation)
  • string interpolation (programming languages eg. ruby, perl, python)
  • string concatenation (most broad)

PS: late arrival:

If referring to the actual string formats:

  • variable references
  • field references/field code
  • format string

Upvotes: 8

Related Questions