Create a function that takes a string (the string to truncate) and a number (the maximum length of the truncated string) as arguments and returns the truncated string at the given length.
truncate("Lorem ipsum dolor sit amet.", 11) ➞ "Lorem ipsum"
truncate("Lorem ipsum dolor sit amet.", 16) ➞ "Lorem ipsum"
truncate("Lorem ipsum dolor sit amet.", 17) ➞ "Lorem ipsum dolor"