About: String interpolation     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : yago:WikicatProgrammingConstructs, within Data Space : dbpedia.org associated with source document(s)
QRcode icon
http://dbpedia.org/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FString_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 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.

AttributesValues
rdf:type
rdfs:label
  • 文字列補間 (ja)
  • String interpolation (en)
rdfs:comment
  • プログラミングにおいて、文字列補間(もじれつほかん、string interpolation)とは、文字列リテラル内に埋め込まれたプレースホルダーを実行時に評価し、そのプレースホルダーを対応する値に置き換える処理である。変数補間 (へんすうほかん、variable interpolation)、変数置換(へんすうちかん、variable substitution)、変数展開(へんすうてんかい、variable expansion)ともいう。この処理は、単純なテンプレートエンジンであり、正式な用語で言えばの一形態である。文字列補間は、文字列連結よりも簡単でより直観的に文字列のフォーマットを規定できる。 文字列補間は、データの文字列表現を多用する多くのプログラミング言語(C言語、Perl、PHP、Python、Ruby、Groovy、Scala、Swiftなど、および多くのUnixシェル)で使用できる。 文字列リテラルの表現には、文字列補間が使えるものと、使えないもの(raw文字列)がある。プレースホルダーは、無名もしくは名前のついたで示される。一般的には$や%が使用され、名前つきの場合は$placeholderや%123のようになる。文字列の補間は実行時に行われる。 (ja)
  • 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 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. (en)
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
Link from a Wikipage to an external page
sameAs
dbp:wikiPageUsesTemplate
has abstract
  • 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 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 repeated quoting and unquoting; or substituting into a printf format string, where the variable is far from where it is used. Compare: apples = 4print("I have ${apples} apples.") # string interpolationprint("I have " + apples + " apples.") # string concatenationprint("I have %s 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. (en)
  • プログラミングにおいて、文字列補間(もじれつほかん、string interpolation)とは、文字列リテラル内に埋め込まれたプレースホルダーを実行時に評価し、そのプレースホルダーを対応する値に置き換える処理である。変数補間 (へんすうほかん、variable interpolation)、変数置換(へんすうちかん、variable substitution)、変数展開(へんすうてんかい、variable expansion)ともいう。この処理は、単純なテンプレートエンジンであり、正式な用語で言えばの一形態である。文字列補間は、文字列連結よりも簡単でより直観的に文字列のフォーマットを規定できる。 文字列補間は、データの文字列表現を多用する多くのプログラミング言語(C言語、Perl、PHP、Python、Ruby、Groovy、Scala、Swiftなど、および多くのUnixシェル)で使用できる。 文字列リテラルの表現には、文字列補間が使えるものと、使えないもの(raw文字列)がある。プレースホルダーは、無名もしくは名前のついたで示される。一般的には$や%が使用され、名前つきの場合は$placeholderや%123のようになる。文字列の補間は実行時に行われる。 (ja)
gold:hypernym
prov:wasDerivedFrom
page length (characters) of wiki page
foaf:isPrimaryTopicOf
is Link from a Wikipage to another Wikipage of
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3330 as of Mar 19 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (378 GB total memory, 53 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software