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
11
votes
15 answers

How to capitalize the first letter of every sentence?

I'm trying to write a program that capitalizes the first letter of each sentence. This is what I have so far, but I cannot figure out how to add back the period in between sentences. For example, if I input: hello. goodbye the output is Hello…
user3307366
  • 307
  • 3
  • 6
  • 15
10
votes
15 answers

How to capitalize first letter in strings that may contain numbers

I would like to read through a file and capitalize the first letters in a string using Python, but some of the strings may contain numbers first. Specifically the file might look like this: "hello world" "11hello world" "66645world hello" I would…
Dino
  • 103
  • 1
  • 5
9
votes
4 answers

BASH - Make the first Letter Uppercase

I try to capitalize the first letter in a CSV which is sorted like this: a23;asd23;sdg3 What i want is a output like this a23;Asd23;Sdg3 So the first String should be as is, but the second and third should have a capitalized first letter. I…
fwaechter
  • 885
  • 3
  • 10
  • 19
9
votes
2 answers

SOLR - wildcard search with capital letter

I have a problem with SOLR searching. When i`am searching query: dog* everything is ok, but when query is Dog*(with first capital letter), i get no results. Any advice? My config:
Yurish
  • 1,307
  • 1
  • 25
  • 44
9
votes
2 answers

PostgreSQL procedural language "C" not found

I am trying to use the PL/R procedural language in a PostgreSQL 9.2 database. I have installed the plr language and I am trying to add it to a database. When I run the command CREATE EXTENSION plr; I get the following error: ERROR: language "C"…
yellowcap
  • 3,985
  • 38
  • 51
9
votes
4 answers

Rails: ensure capitalization in model?

In a Rails model, if I have a field that is for proper names, what is the best practice way to ensure they are uniformly capitalized despite potentially lazy input from users? IE let's say the model is Contact and the field is Name. No matter what…
Andrew
  • 42,517
  • 51
  • 181
  • 281
8
votes
3 answers

Android: Convert first letter of string to lower case

I'm looking for a way to convert the first letter of a string to a lower case letter. The code I'm using pulls a random String from an array, displays the string in a text view, and then uses it to display an image. All of the strings in the array…
cerealspiller
  • 1,401
  • 3
  • 14
  • 23
8
votes
2 answers

How should I capitalize Ruby?

RUBY? Ruby? ruby? What's good style? I know the answer—I just wanted to make sure the question was out there and questioners were aware that there is a correct form. Also, should I capitalize "gem" as "GEM"? class TestLanguageName <…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
8
votes
4 answers

Capitalize f.text_field

I have a form_for and I want that any value inside x.textField appear with the first letter in Upcase (I'm talking about the edit where the textfield are prefilled by the db values).
Joe
  • 1,747
  • 3
  • 17
  • 24
8
votes
3 answers

pseudo selector for uppercase chars/words?

Is there a CSS pseudoselector for uppercase characters/letters/words? I want all my capitals to be a pt smaller and all the other characters the same size. A capital is not neccesarily the first character of a sentence (or word) nor the other way…
Rudie
  • 52,220
  • 42
  • 131
  • 173
8
votes
5 answers

Capitalizing texts in user interface

I'd like to ask you if there is a reason to capitalize all items in menus, etc in application user interface, for example File->Page Setup Edit->Select All Help->Technical Support Why shouldn't I just label these items as File->Page setup etc.?…
Axarydax
  • 16,353
  • 21
  • 92
  • 151
8
votes
9 answers

Capitalization Permutations

I wanted to write a snippet of ruby that would take a string and output all possible permutations of capitalizations. Basically, I have a password that I remember, but I don't remember how it is capitalized. I have the following so far: def…
epid
  • 153
  • 5
8
votes
9 answers

How to capitalize first letter razor

I am new to MVC and have not found a solution for this online. I have the html as : @Html.DisplayFor(model => model.Address1)
I want all the first letter of address1 to be capital letters e.g. Something Road instead of something road. Now I…
Zaki
  • 5,540
  • 7
  • 54
  • 91
8
votes
2 answers

Why is the 't' in Hash Table(Hashtable) in Java not capitalized

Everything in Java seems to follow capitalization rules except for Hashtable. Hashtable ht = new Hashtable(); as opposed to ArrayList a = new ArrayList(); or HashMap a = new…
Vrashabh Irde
  • 14,129
  • 6
  • 51
  • 103
7
votes
7 answers

Change the Font Style - (Set Lable text in All-Caps format ) in Objective C

I want to set the UILable text font style in Small-Caps format like below image. Please give me the solution for this if anyone know, Thanks. :)
Raj
  • 1,213
  • 2
  • 16
  • 34