# Is there any way in Julia to perform string interpolation after the string is decl

**URL:** <https://discourse.julialang.org/t/is-there-any-way-in-julia-to-perform-string-interpolation-after-the-string-is-decl/55688>\
**Category:** General Usage\
**Tags:** string-interpolation\
**Created:** [February 20, 2021, 5:03pm UTC](https://discourse.julialang.org/t/is-there-any-way-in-julia-to-perform-string-interpolation-after-the-string-is-decl/55688 "2021-02-20T17:03:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BridgeBot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bridgebot/32/21491_2.png) [@BridgeBot](https://discourse.julialang.org/u/BridgeBot)\
**Post date:** [February 20, 2021, 5:03pm UTC](https://discourse.julialang.org/t/is-there-any-way-in-julia-to-perform-string-interpolation-after-the-string-is-decl/55688/1 "2021-02-20T17:03:19Z")

</div>

Is there any way in Julia to perform string interpolation after the string is declared?

For example in python I can do:

```julia
&gt; x = "Hello, {}"
&gt; x.format("friend")
'Hello, friend'

```

So I can declare `x` with placeholders, and later decide what goes in the placeholder. Is there any equivalent to this in Julia?

Thanks!

Note that the original poster on Slack cannot see your response here on Discourse. Consider _transcribing the appropriate answer back to Slack_, or pinging the poster here on Discourse so they can _follow this thread_.  
[(Original message :slack:)](https://julialang.slack.com/archives/C6A044SQH/p1613840565017600?thread_ts=1613840565.017600&cid=C6A044SQH) [(More Info)](https://github.com/JuliaCommunity/SlackBridge)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 20, 2021, 5:37pm UTC](https://discourse.julialang.org/t/is-there-any-way-in-julia-to-perform-string-interpolation-after-the-string-is-decl/55688/2 "2021-02-20T17:37:12Z")

</div>

> [@BridgeBot](#):
>
> So I can declare `x` with placeholders, and later decide what goes in the placeholder. Is there any equivalent to this in Julia?

There are packages for this, e.g. the C-style [Printf standard library](https://docs.julialang.org/en/v1/stdlib/Printf/) or the Python-style [Formatting.jl](https://github.com/JuliaIO/Formatting.jl), and also [Mustache.jl](https://github.com/jverzani/Mustache.jl).
