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
-1
votes
6 answers

How to capitalize first letter of every single word in a text area?

i have a multiline textfield("Adressfeld"), and i want to Uppercase every first letter and LowerCase the rest of every single word in this text area. Here is my try: function capitalize(Eingabe){ Eingabe = this.getField("Adressfeld").value; var…
renokl2014
  • 121
  • 1
  • 11
-1
votes
3 answers

How do I stop my function from returning 0?

I know the function has to return an integer, but in it, I print letter by letter in capital, and it also prints out the 0 that I am forced to return. I tried referencing void capital(string& _name) but this just gave me tons of errors. I think I…
sampjr
  • 103
  • 1
  • 2
  • 14
-1
votes
2 answers

How to get all capitalizations of a word?

I am trying for some time now to imagine a way to generate all possible capitalizations of a word in Python. For instance: hello Hello HEllo ... heLLo ... HeLlO I found some built-in functions which work on capitalization (.capitalize() for…
WoJ
  • 27,165
  • 48
  • 180
  • 345
-2
votes
1 answer

string subscript out of range error in word capitalization

Actually, the program works fine in Devc++ but gives me the error if i run it in VisualStudio, does anybody know why this happens? The program should check if it has to cout a string from the stati array with every first letter of each word…
akaManen
  • 27
  • 6
-2
votes
1 answer

Is there a way to have a program accept capitalized and uncapitalized inputs?

As the title says, I have my program functioning with capitalization but I would like it to have compatibility with uncapitalized and capitalized inputs. It should return as capitalized encryption. decrypted = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ.1234567890…
Ean Crosby
  • 19
  • 3
-2
votes
2 answers

Capitalizing without downcasing string in python

I am looking for a function to force the upper case of the first character of my string but without modifying the case of the following characters. >>> print('FRANCE'.capitalize()+' while wished answer will be "FRANCE"') France while wished answer…
Sigmun
  • 1,002
  • 2
  • 12
  • 23
-2
votes
1 answer

Can I assign 2 values into a char variable?

I'm wondering if I can compare a char with 2 values? I'm trying to make a loop that will repeat until some variable is equal to either A, a, B, b, C, or c. Is there any way to ignore the capitalization? I tried the following code: final char…
-2
votes
2 answers

How do you capitalize a whole word in javascript?

can someone tell me how to capitalize my whole name from Jason Sims to JASON SIMS please! ['Name:', 'Jason Sims'], ['Career: Welder'], ['Description: In transition to becoming a developer!'], ];```
-2
votes
1 answer

How can I do a C program that capitalizes the first characters of the words in the file?

#include int main() { FILE *fp; int i; int pos; fp=fopen("test.txt","r+"); fseek(fp,0,SEEK_END); pos=ftell(fp); char ch[pos-1]; fseek(fp,0,SEEK_SET); …
cilvegozu
  • 3
  • 1
  • 4
-2
votes
2 answers

capital letters in firt letter

In python, I want a program that turn the first leter on a word capital letter. For exemple: turn "a red apple is sweeter than a green apple" in "A Red Apple is Sweeter Than A Green Apple" How can I do? I've tried this: d = input('insert a…
-2
votes
1 answer

C++ How to capitalize first word of each sentence/line in a string?

I am loosing my hair right now. I have a string, which i manipulate to start a new line/sentence after a punctuation, but I cant understand how I can capitalize the first word of each sentence? Except for this, i can not get out of the loop to…
Thesar
  • 57
  • 1
  • 1
  • 9
-2
votes
1 answer

Access, detect last name if the first letter is not capital letter

If I import new set of data of last and first name, how can I detect last name which the first letter is not capital letter or space before name??? and after detect it, how can I see the list of result? such as Name : Lee Arvin kwon Tony kwon, Tony…
Kevin
  • 1
  • 3
-2
votes
2 answers

String capitalization not working

What can be the reason of string capitalization not working? A database column: t.string "name", limit: 255 Some example: flower_name = Flower.find_by(id: 1).name #=> "chamomile©" Trying to capitalize (got the same…
Nadiya
  • 1,421
  • 4
  • 19
  • 34
-2
votes
1 answer

Make name uppercase with multiple capital letters

Basically, I'd like to do the following: McDonald => McDONALD McDowell => McDOWELL McIntosh => McINTOSH etc. I'm also looking into things like iPhone => iPHONE, but I'm probably just going to use a set list for that. However, the…
jhpratt
  • 6,841
  • 16
  • 40
  • 50
-2
votes
4 answers

Is there a function that will ignore capital letters in javascript?

i have a chatbot that answers questions only if i write them the same way as in the code Ex: If i wrote the tag "Hello" it will not answer if i say in the chatbot "hello" . I have to write it with a capital letter like in the code. Is there a…
1 2 3
27
28