Swift String Exercises: Accept two strings of different length and return a string of the form short+long+short
Write a Swift program that accept two strings of different length and return a string of the form short+long+short. Two given string's length may be 0.
Pictorial Presentation:

Sample Solution:
Swift Code:
Sample Output:
SwiftExamplesSwift RedGreenRed
Go to:
PREV : Write a Swift program to create a new string without the first and last character of a given string. The string length must be at least 2.
NEXT : Write a Swift program that accept two strings and return their concatenation, except the first char of each string. The given strings length must be at least 1.
Swift Programming Code Editor:
Improve this sample solution and post your code through Disqus
What is the difficulty level of this exercise?
Based on 136 votes, average difficulty level of this exercise is Hard
.