From bc3327ae6e2e992a9b11eb615bfc8d8fed90e281 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Fri, 28 Jul 2017 11:09:57 +0100 Subject: doc: describe joining strings using the + symbol --- docs/markdown/Syntax.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/markdown') diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 37c1857..02db228 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -68,6 +68,16 @@ single quote = 'contains a \' character' Similarly `\n` gets converted to a newline and `\\\\` to a single backslash. +#### String concatenation + +Strings can be concatenated to form a new string using the `+` symbol. + +```meson +str1 = 'abc' +str2 = 'xyz' +combined = str1 + '_' + str2 # combined is now abc_xyz +``` + #### Strings running over multiple lines Strings running over multiple lines can be declared with three single quotes, like this: -- cgit v1.1