Just playing a bit around brings this output
FOOS = this is a string
message("FOOS " $$FOOS)
contains(FOOS, this is a string) {
message("Does first contains ")
}
contains(FOOS, is) {
message("Does second contains ")
}
message(" ")
FOOS = "this is a string"
message("FOOS " $$FOOS)
contains(FOOS, this is a string) {
message("Does first contains ")
}
contains(FOOS, is) {
message("Does second contains ")
}
message(" ")
FOOS = $$quote(this is a string)
message("FOOS " $$FOOS)
contains(FOOS, this is a string) {
message("Does first contains ")
}
contains(FOOS, is) {
message("Does second contains ")
}
message(" ")
FOO = $$shell_quote(this is a string)
message("FOO " $$FOO)
FOO2 = $$system_quote(this is a string)
message("FOO2 " $$FOO2)
and the output is:
Project MESSAGE: FOOS this is a string
Project MESSAGE: Does second contains
Project MESSAGE:
Project MESSAGE: FOOS this is a string
Project MESSAGE: Does first contains
Project MESSAGE:
Project MESSAGE: FOOS this is a string
Project MESSAGE: Does first contains
Project MESSAGE:
Project MESSAGE: FOO "this is a string"
Project MESSAGE: FOO2 "this is a string"
Therefore, using the quote function is simply the same as putting a string into quotes. Assigning a string to a variable without quotes results into a string list. Only quotes or the quote function assigns a single string.
In case also quotes have to be added to the variable one may use functions shell_quote or system_quote.