Have you noticed there’s no more ALL CAPS title anymore? Thanks to nil and godsangell for abusing it and giving me the motivation to write a function that prevents it.
I did notice and thank you very much for doing that! A while ago I had attempted to configure my custom CSS to change titles that were all capital letters to being lowercase, but still keeping first letter of the sentence as capitalized while also permitting capitalizing mid-sentence of acronyms like ATF. My attempts sucked.
string n = title.text(); n = lowercase(n); for(int i = 0, i < n.length - 1, i++) { if(n[i] == ' ') ToCaps(n[i+1]); }
Fuck me it's been so long since I wrote code. Strings are just arrays IIRC and length is the # of bytes and 1 byte sin a character array = 1 character so it should work?
It wouldn’t work. You need to define the function and also check if the title is all caps first.
Right I didn't do function definitions nor did I create a scope. I wasn't writing a whole program.
(post is archived)