A few spaces missing here:

    for (uint i = 0; i < in.length() - 1 ; i++)