rspec/rules/S1645/description.adoc

2 lines
388 B
Plaintext
Raw Normal View History

2021-01-29 09:19:51 +01:00
Both the "{plus}" operator and the "&" operator can be used to concatenate strings. However, there is a complicated set of rules around the actual behavior of the "+" operator, and whether you will get a concatenation operation, addition, a compiler error, or a ``++Type mismatch++`` error. On the other hand, the "&" operator can only perform concatenation, and is therefore preferred.