Skip to content

Latest commit

 

History

History

StringSplitAndJoin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Task

Given a string. Split the string on a " " (space) delimiter and join using a - hyphen.

Take following parameters: string line: a string of space-separated words

Returns string: the resulting string

Input Format

The one line contains a string consisting of space separated words.

Sample Input

this is a string

Sample Output

this-is-a-string