Skip to content

Split Strings #28

@hatedinny1

Description

@hatedinny1

題目網址 : 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#

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions