UpTo
UpTo[n] is a symbolic specification that represents up to n objects or positions. If n objects or positions are available, all are used. If fewer are available, only those available are used.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.