Write a method mincat that takes two strings


Write a method minCat that takes two strings s and t, and returns a new string. The returned string contains the concatenation of s and t; however, if one of the strings is longer than the other, omit characters from the end of the longer string so that it is the same length as the shorter string.

minCat("Hello", "hi") returns "Hehi"
minCat("hi", "Hello") returns "hiHe"
minCat("cat", "dog") returns "catdog"
minCat("a", "Hello World") returns "aH"

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a method mincat that takes two strings
Reference No:- TGS0540783

Expected delivery within 24 Hours