"Richard D. Jackson" wrote:
... snip ...
So the question is how can you assign the capacity to a String type when you are returning it from a function? I would prefer to not have to make a type for this if possible.
Just think about functions in general. What are you going to do with the values they return? In general, you will store them in a variable, which must have a type that can receive that function result. To have two (or more) things of the same type it is necessary to declare that type.