Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Strings #28

Open
hatedinny1 opened this issue Sep 20, 2016 · 0 comments
Open

Split Strings #28

hatedinny1 opened this issue Sep 20, 2016 · 0 comments

Comments

@hatedinny1
Copy link

題目網址 : https://www.codewars.com/kata/515de9ae9dcfc28eb6000001

Description:

Complete the solution so that it splits the string into pairs of two characters. If the string contains an odd number of characters then it should replace the missing second character of the final pair with an underscore ('_').

Examples:
SplitString.Solution("abc"); // should return ["ab", "c_"]
SplitString.Solution("abcdef"); // should return ["ab", "cd", "ef"]

中譯版本:
由呼叫端傳入一個字串,預期回傳一個字串陣列(字元兩兩一組),
若有不足一組則補上底線(_)。

Pass by C#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant