[SWIFT] A trick when you want to insert a lot of line breaks and tabs when substituting a character string

for variable in start value...End value{
                            //statement
                        }

When you want to assign such a character string to a variable and output it, スクリーンショット 2020-10-24 12.04.39.png I wrote it like this. ugly···.

スクリーンショット 2020-10-24 12.04.18.png The source code is easier to see here.

let string = """
Write the character string you want to put here.
Tab input becomes possible like this.
You can't write here."""It will be recognized if you call it after.
        """

Recommended Posts

A trick when you want to insert a lot of line breaks and tabs when substituting a character string
[Swift] When you want to know if the number of characters in a String matches a certain number ...
How to write when you want to keep line breaks and output while avoiding XSS in Rails
A memo when you want to clear the time part of the calendar
When you want to explicitly write OR or AND with ransack
When you want to change the MySQL password of docker-compose
String concatenation and line breaks
When you want to check whether the contents of a property can be converted to a specific type
When you want to add a string type column with a limited length with the `rails generate migration` command
When you want Rails to disable a session for a specific controller only
Summary of means when you want to communicate with HTTP on Android
[Java] How to use substring to cut out a part of a character string
rails c does not start and a lot of line errors appear
[Ruby] I want to make an array from a character string with the split method. And vice versa.
What to do when you want to delete a migration file that is "NO FILE"
[Spring Boot] If you use Spring Boot, it was convenient to use a lot of util.
I want to recursively get the superclass and interface of a certain class
[java tool] A useful tool when you want to send the ipmsg log of PC-A to the specified PC on a regular basis.
Summary of copy and paste commands used when you want to delete the cache in iOS application development anyway
[Java] When putting a character string in the case of a switch statement, it is necessary to make it a constant expression
[Ruby] When you want to assign the result obtained by conditional branching to a variable and put it in the argument
I want to find the MD5 checksum of a file in Java and get the result as a string in hexadecimal notation.