FAQ Database Discussion Community
regex,capitalization
I'm trying to come up with a search and replace method for capitalizing the first letter after a tag, but I've had no luck. I'm using the regex mode of Notepad++....
ruby-on-rails,string,capitalization,hyphenation,cap
I'm trying to capitalize both parts of a hyphenated word with Rails: "hello-world".capitalize # => Hello-world "hello-world".titleize # => Hello World Is there a quick way of doing this? If not then I will write a custom solution, I can figure that out, but I'm hoping there is some really...
c++,file,capitalization
Im very new to C++ and ive been struggling for quite a while trying to figure out how to do this problem. Basically, i need to read from a file and find all instances of an article ("a","A","an","aN","An","AN","the","The","tHe","thE","THe","tHE","ThE","THE")and then insert an adjective after that article. The adjective's capitalization must be...
php,capitalization
I am wanting the output to have the First Letter Of Each Word uppercase. Here is my code. function random_title () { $quotes1 = file ("wp-content/plugins/includes/classes/quotes.txt", FILE_IGNORE_NEW_LINES); $quotes1 = ucwords($quotes1); $num = rand (0, intval (count ($quotes1) / 3)) * 3; return $quotes1[$num]; } Usage is: random_title() This part is...
javascript,if-statement,prompt,capitalization,capitalize
This question already has an answer here: JavaScript case insensitive string comparison 7 answers I'm writing a simple Rock, Paper, Scissors program from scratch and I have an IF statement that seems bloated. I know it can be trimmed down but I can't find the answer anywhere. I first...
c++,naming-conventions,capitalization
I was wondering about the naming conventions in C++, specifically where and what gets capitalized. I guess what I'm asking is (having come from languages like Java and C#) why are things like std::vector and std::string are not capitalized? As a follow up, if I was typedefing a std::string to...