I have 2 strings. I want to combine the two strings as long as the number of characters of the combined string are 20 or less. If the combined length is great than 20 I want to truncate the first string until the combined length is 20. The second string will never be more than 2 characters.
This is easy to do. But, I’m looking for short, elegant code.
1 Answer