• Michael L John - Monday, December 11, 2017 11:11 AM

    It also truncates the string if there are double spaces. 

    I used:
    'This Is a Test of this function'
    it returned
    'This Is A Test'

    Could you please post the complete code you used as the above logic which Chris posted returns correctly, where the string has multiple spaces without any truncation.