Copy a portion from the start of a string.
Returns the substring of a specified length that appears at the start of a string.