String
String
Introduction
Hello,
In this lesson, we will do String operations with Swift.
we may want to define a String as a multiline. It will be enough to write the relevant String between Triple quotes.
Let's look at the example below.
let quotation = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
"""In Swift, Strings are value types.
In Swift, Strings are value types.
When a new String is created, the String value is copied. So they are expressed as pass by value.
It is important for code security that the string is being copied. It is especially important to know that the Strings used in functions will not change later.