← 返回 nvidia 的题目列表Convert String to Lowercase and Add Hyphens After Each Character
类型:online_judge
nvidia
Basic Programming Task: Please implement a function to convert all uppercase letters in a given string to lowercase and add a hyphen after each letter in the string. For example, given the input 'A1B2C', the output should be 'a-1-b-2-c-'. Provide full code and outline the following test cases:
Input: 'XYZ' Output: 'x-y-z-'
Input: 'AbC' Output: 'a-b-c-'
Input: '1A2' Output: '1-a-2-'
Input: '' Output: ''
Input: '123' Output: '1-2-3-'
Example
Input
XYZ