PascalName seperate strings

#include <iostream>
#include <string>

int main() {
    // Declare a string containing PascalCaseName
    std::string pascalCaseName = "PascalCaseName";

    // Create an empty string to store the separated words
    std::string separatedWords;

    // Iterate through each character in PascalCaseName
    for (char character : pascalCaseName) {
        // Check if the character is an uppercase letter
        if (std::isupper(character)) {
            // If it is, add a space before the uppercase letter
            separatedWords += ' ';
        }

        // Add the current character to the separatedWords string
        separatedWords += character;
    }

    // Output the separated words
    std::cout << "Separated Words: " << separatedWords << std::endl;

    return 0;
}