swift string pad code example Example: swift string pad string.padding(toLength: 40, withPad: " ", startingAt: 0)