Questions tagged [capitalization]

Capitalization means changing each first letter of a string to a capital letter.

Capitalization means changing each first letter of all words in a string to capital letters. For example, "this is a test" would become "This Is A Test". In some programming languages, capitalization only makes the first letter of the string a capital, and not the first letter of each word.

412 questions
2
votes
3 answers

Capitalize both parts of a hyphenated word with Rails

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…
stephenmurdoch
  • 34,024
  • 29
  • 114
  • 189
2
votes
1 answer

PHP First Letter Uppercase of Each Word In Output

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); …
Matt
  • 163
  • 1
  • 3
  • 15
2
votes
2 answers

Capitalizing the first letter after a tag

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++.
eams
  • 43
  • 5
2
votes
0 answers

rails 4 - cannot capitalize a localized utf-8 string correctly when first character is accentuated

I have a localized string : en: doorkeeper: device: device fr: doorkeeper: device: équipement capitalizing the string using I18n.locale = :fr is incorrect ( in french an initial capitalized letter is never…
user762579
2
votes
3 answers

Capitalize Words in PHP with custom delimitor

I need a method to capitalize every first letter of a word. This is what i got so far and it is working for almost every string...but it fails on this one "WELLNESS & RENOMME". // method in stringModify Class function…
Paulie
  • 21
  • 3
2
votes
2 answers

Capitalize the first letter of each word while typing in Drupal 7

How do I capitalize the first character of each word while typing in Drupal 7? I mean, while creating a node and entering the node title, while typing something it capitalizes the first character of each word. I know that it does this capitalization…
herci
  • 375
  • 1
  • 4
  • 24
2
votes
3 answers

String case operations in CSVs, Python

I want to fix my CSV file's case issues as simply as possible. I already have pandas imported if that simplifies the code. So I want to replace Name City State FOO BAR los angeles ca guy's naME PHILADELPHIA …
Xodarap777
  • 1,358
  • 4
  • 19
  • 42
2
votes
5 answers

Need help with hard regex

I need a regex that checks if a string only contain letters(a-z) and that the first letter is uppercase, you cant have 2 letters in a word uppercase Like: THomas or THomAS but Thomas Anderson (Thomas anderson too) would be valid look: The Magician…
Tomasz
  • 23
  • 3
2
votes
2 answers

Why does Perl's Text::Capitalize turn "Juvénal" into "JuvéNal"?

I'm using Text::Capitalize to try and title case some UTF-8 encoded names from a web page (downloaded using WWW::Mechanize, but I'm not getting the results I'm expecting. For example, the name on web page is "KAJELIJELI, Juvénal" but…
Mark
  • 21
  • 1
2
votes
1 answer

Any difference between capital and lowercase XML / RDF tag names?

I noticed that the install.rdf files of firefox extensions have some capitalized tag names i.e. . Will it make any difference if it was lowercased i.e. ? The files are xml so I don't see the problem but just wondering.
steve
  • 3,878
  • 7
  • 34
  • 49
2
votes
2 answers

Is there a way to programmatically turn on the 'shift' (capitalize) key in iOS?

I have a UITextView and I automatically write the date in it. I would then like to have the cursor after the date, with the shift (capitalize) button pressed so the user can just start typing and the first letter will be capitalized. Is this…
Rossi
  • 609
  • 6
  • 14
1
vote
1 answer

Auto capitalization of first letter of a sentence is not working when we use swipe keyboard in android device

In my app I used TYPE_TEXT_FLAG_CAP_SENTENCES for the edittext, etMessage.setInputType(EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES); it is working with the default keyboard in every devices and emulator. But when we use swipe keyboard the…
Aju
  • 4,597
  • 7
  • 35
  • 58
1
vote
1 answer

Capital letters in column title?

Could someone tell me if it's alright to use capital letters in column titles in Mysql? Sorry if this a dumb question, but i just couldn't find the answer anywhere else... Thanks
something
  • 517
  • 3
  • 10
  • 22
1
vote
1 answer

Capitalize article, journal and book titles in biblatex bibliography

I would like to capitalize not only article and journal titles as in here and in the MWE below that simply reproduces the latter, but also book titles when using biblatex. My MWE for the main text is…
Daniel
  • 77
  • 5
1
vote
2 answers

Capitalizing letters using for in range loop

I'm trying to solve a problem where a for in range loop goes over a sentence and capitalises every letter following a ".", a "!" and a "?" as well as the first letter of the sentence. For example, welcome! how are you? all the best! would…
chonk1234
  • 11
  • 1