Answers.Body: <p>I've tested these three methods (the first one from AbbeyDesign's answer,) and they seem to work fine with variables, I can't see any obvious reason why they wouldn't:</p>
  
  <pre><code>{% set entry = { artistFirstName: 'hello', title: 'world' } %}
  
  {% set title = (entry.artistFirstName|capitalize) ~ ' ' ~ (entry.title|capitalize) %}
  {% set title = "#{entry.artistFirstName|capitalize} #{entry.title|capitalize}" %}
  {% set title = [entry.artistFirstName|capitalize, entry.title|capitalize]|join(' ') %}
  </code></pre>
  
  <p>Results in "Hello World" in each case.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-17T20:12:49.023Z
Answers.Text: That's really strange, I tried each of your methods but each always results 'Hello world'. Note that I use this to set the <title> attribute, at the top of my _entry.html. I'm not trying to add this inside a {% block content %}. Perhaps that's why it's not working in my case?
Answers.UserDisplayName: Romain P.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-18T00:00:44.717Z
Answers.Text: If you're not sure about whether the block is an issue or not, it may be worth testing these on a page that isn't using extends/block/set or whatever.  Give them a shot on a basic page and try to complicate things afterwards.  In my tests, the syntax for these is working just fine as well so it's likely a larger context issue.
Answers.UserDisplayName: Ben Parizek
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-17T12:00:34.960Z
Answers.LastActivityDate: 2014-09-17T12:00:34.960Z
Answers.UserDisplayName: Mike Pepper
Answers.Body: <pre><code>{% set title = (entry.artistFirstName|capitalize) ~ ' ' ~ (entry.title|capitalize) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-16T20:09:40.560Z
Answers.Text: Sorry, this doesn't work for me.
Answers.UserDisplayName: Romain P.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-16T19:55:35.270Z
Answers.LastActivityDate: 2014-09-16T19:55:35.270Z
Answers.UserDisplayName: AbbeyDesign
Body: <p>Here's an example:</p>
  
  <pre><code>{% set title = entry.artistFirstName | capitalize ~ ' ' ~ entry.title | capitalize %}
  </code></pre>
  
  <p>It outputs <em>Firstname title</em> instead of <em>Firstname Title</em> whereas filters are applied on the two concatenated elements. Why and how to add this filter on each of these elements?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-17T01:44:10.670Z
Comments.Text: Does it work as expected if you just use plain text?: {% set title = 'lowercase this' | capitalize ~ ' ' ~ 'lowercase that' | capitalize %}
Comments.UserDisplayName: Ben Parizek
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-17T20:14:37.440Z
Comments.Text: No: 'Lowercase this lowercase that'.
Comments.UserDisplayName: Romain P.
Tags: <filter><titles>
Title: How to apply a filter on a title with several concatenated elements?
ThreadText: # How to apply a filter on a title with several concatenated elements?
  
  (Asked by: username_0 on 2014-09-16)
  
  Here's an example:
  
  ```
  {% set title = entry.artistFirstName | capitalize ~ ' ' ~ entry.title | capitalize %}
  
  ```
  
  It outputs *Firstname title* instead of *Firstname Title* whereas filters are applied on the two concatenated elements. Why and how to add this filter on each of these elements?
  
  **Tags:** filter, titles
  
  > **Comments:**
  > **username_1**: Does it work as expected if you just use plain text?: {% set title = 'lowercase this' | capitalize ~ ' ' ~ 'lowercase that' | capitalize %}  
  > **username_0**: No: 'Lowercase this lowercase that'.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-09-17. Score: 3
  
  I've tested these three methods (the first one from username_3's answer,) and they seem to work fine with variables, I can't see any obvious reason why they wouldn't:
  
  ```
  {% set entry = { artistFirstName: 'hello', title: 'world' } %}
  
  {% set title = (entry.artistFirstName|capitalize) ~ ' ' ~ (entry.title|capitalize) %}
  {% set title = "#{entry.artistFirstName|capitalize} #{entry.title|capitalize}" %}
  {% set title = [entry.artistFirstName|capitalize, entry.title|capitalize]|join(' ') %}
  
  ```
  
  Results in "Hello World" in each case.
  
  > **Comments:**
  > **username_0**: That's really strange, I tried each of your methods but each always results 'Hello world'. Note that I use this to set the <title> attribute, at the top of my _entry.html. I'm not trying to add this inside a {% block content %}. Perhaps that's why it's not working in my case?  
  > **username_1**: If you're not sure about whether the block is an issue or not, it may be worth testing these on a page that isn't using extends/block/set or whatever.  Give them a shot on a basic page and try to complicate things afterwards.  In my tests, the syntax for these is working just fine as well so it's likely a larger context issue.  
  
  ---
  
  ### Answer by username_3 on 2014-09-16. Score: 0
  
  ```
  {% set title = (entry.artistFirstName|capitalize) ~ ' ' ~ (entry.title|capitalize) %}
  
  ```
  
  > **Comments:**
  > **username_0**: Sorry, this doesn't work for me.  
  
  ---
  
  