UpperLowerProper

Home Forums Projects UpperLowerProper

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3119
    DeVaultSetter
    Keymaster

      This is for games that run on Unix and SteamDeck system, see Arthmoor’s post.
      Repo is no more or less currently resident at UpperLowerProper. 🙂

      #3127

      Still need to log in to GitHub but a C++ version doesn’t appear to be too difficult with few dependencies, especially with the filesystem library being added circa 2018. May take a stab at it and see if things start coming back to me as it’s been a good while since I did coding and I have been in the mood for more than just thinking up algorithms. 🙂

      Essentially, we can do with addition and subtraction with the ASCII values, going character by character in the string. For proper case, we’d also check each substring, delimited by a space, and compare that to the word list for proper case. Another option is to use the transform function on the string and combine it with the toupper() or tolower() functions to do the whole string in one go and add it to to the new path list. Finally, we’d take our collection of paths and apply the rename function on them. Sorry if the algorithm is pretty rough, I’m pretty out of practice 🙂

      #3164
      DeVaultSetter
      Keymaster

        A C++ job to emulate a cmd console when prompting for input might be fun as well, along with the additional “Proper” case task for an extra sugar hit? It’s possible an old Dossite can be convinced after all! 🙂
        It’ll want testing, thus the next step is to cautiously broach the bounds of temerity of any willing tester over at AFKMods. 🙂

        #3167

        Console input is pretty straightforward, you just need to include the input/output library. Here’s an example:

        #include <iostream>
        int main() {
        	int x;
        	std::cout << "Enter a number: ";
        	std::cin >> x;
        	std::cout << std::endl << "You entered: " << x;
        	return 0;
        }

        Command-line arguments would also be handy but the language only has rudimentary support for them by default. There are third-party libraries that help to fill in the gaps with them, though.

        For storing the set of proper case keywords, a set may be the best container to use. In the rename loop, check the word to see if it’s in the set using the contains member function. So I think I just inadvertently wrote the entire program here. Only thing missing is the actual code 😛

        Using the built-in types like this would also make it completely cross-platform 🙂

        Sounds good 🙂

      Viewing 4 posts - 1 through 4 (of 4 total)
      • You must be logged in to reply to this topic.

      Home Forums Projects UpperLowerProper