Swift Program to Create a Multi-Line String Literal

You are currently viewing Swift Program to Create a Multi-Line String Literal

Swift program to create a multi-line string literal

// Swift program to create a 
// multi-line string literal

let multiLineString = """
Indian Cricket Team:
Rohit Sharma
Virat Kohli
Shikar dhawan
Rishab Pant
K. L. Rahul
"""
print(multiLineString)

Output

Indian Cricket Team:
Rohit Sharma
Virat Kohli
Shikar dhawan
Rishab Pant
K. L. Rahul

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply