Recursion - Duplicate character formatting

I was having doubt in the editorial code,
can you tell me what is the meaning of this line

string ros = duplicateChar(s.substr(1));

and duplicateChar(s) is a recursive function.

I want to know what output this statement will give if i give input “hello”.

s.substr(1) is used to provide the substring of s starting from 1 to the last character.
u can read about substr function from

http://www.cplusplus.com/reference/string/string/substr/

s.substr(1) would provide u ‘ello’
then there is recursive call from “ello”
again s.substr is called -> ‘llo’
this happens until

if (s.size() <= 1)
    {
        return s;
    }