Questions tagged [capitalize]

Capitalize is writing a word with its first letter as a capital letter (upper-case letter) and the remaining letters in lower case.

Capitalize is writing a word with its first letter as a capital letter (upper-case letter) and the remaining letters in lower case.

Mark the questions with this tag if it concerns automatic capitalization of strings.

If question is related to make the whole string upper-case, use tag .

321 questions
-1
votes
4 answers

Count the capitals in the word javascript

) I am trying to solve one problem with this statement : Write a function called howManyCaps which counts the capitals in the word,it then returns a sentence saying how which letters are capital and how many capitals there are in total. This is my…
-1
votes
2 answers

Modal Input extract initials only

I have a modal input with 2 fields. One is the text input for the full name and the second is a disabled field to get the live result. The result is the Capitalized letter of each word in the input text field 1. I have no clue on how to go about…
Kumar
  • 5
  • 2
-1
votes
3 answers

.capitalize() doesn't work in Python in this case

Given a list of words (text), i want to take each word except the first one and capitalize it. It doesn't work for neither i.capitalize() and i = i.capitalize(). Why? def capitalize_words(text): for i in text[1:]: i.capitalize() …
heressy
  • 11
  • 1
-1
votes
3 answers

Capitalize first letter in the list

List_1 = ['KEYUR', 'MoNica', 'tom', 'MuRali'], I want first letter of each word in Caps and rest in lower case and the output should be in a single line. I have tried the below code, but the output I receive is vertical. input_list=['VARMA', 'raj',…
Manz
  • 1
  • 2
-1
votes
2 answers

Convert every other letter in String to uppercase, counting only characters java

I want to convert every other letter in a string to capital. Say I have a string: "h3e5l!@lo461!28", I need to see if the character is a letter and then convert every other letter to capital. Here is my code right now but it doesn't work and I don't…
Dave
  • 59
  • 5
-1
votes
3 answers

For loop prints different output Can this be checked please

I'm really frustrated how the for loop works. Ill post two scenarios. My output should be "12 abc"-->"12 Abc" and if "12abc"-->"12abc"(output). But I came up with two solutions for this: s= '12 abc' a_string = s.split() for word in a_string: …
Kishore Kumar
  • 47
  • 1
  • 6
-1
votes
1 answer

Python: Capitalize every sentence from a txt file retaining the format of file

I want to capitalize on every first word of a sentence from a text file. But after paragraph change, python reads \n in starting of String which changes the format of the txt file. I want to retain the format while making all the first letters of…
-1
votes
1 answer

How can capitalize 1st and 4th letter for more than one word in a string?

I have solved the problem of how to capitalize the first and forth letter but out of curiosity I am trying to do that for all the words in a list rather than just the first: def my_function(name): if len(name) > 3: return…
Marius.T
  • 25
  • 7
-1
votes
4 answers

How to sort strings in java , order shoud display Capital Strings first

Need to sort strings in java in a case sensitive, but Capital letters should display first. What I tried: List l =…
-1
votes
3 answers

Java. Capitalizing, adding period

Working on this rookie task and need help. This code must: Capitalize the first letter of the first word. Add a period (.) to the end of the sentence. Join the words into a complete string, with spaces. Do no other manipulation on the words. Here…
upandgreen
  • 69
  • 5
-1
votes
1 answer

How to make first letter uppercase of full capitalized sentence using css

I have a sentence like this 'MY FIRST LINE'. How to make first letter of each word capital letter and other letters small letters using css.
Green Computers
  • 723
  • 4
  • 14
  • 24
-1
votes
4 answers

how to use for of loop, resulting an array as an output

I want to capitalize the days in the array named 'days' and get the result in an array form only by calling 'console.log(days)' Please see below : Can anybody help me finish up code in the the block of for of loop? edit(summary) : I questioned this…
-1
votes
3 answers

Capitalize function not working properly

I'm learning the basics in c++ and I'm trying to write a simple function that capitalizes every letter of each word in a given input. What I've written: #include #include #include #include int main() { …
b_rabbit
  • 61
  • 5
-1
votes
5 answers

Replace all non capitalised words with ruby

I would like to replace all non capitalised words in a text with "-".length of the word. For instance I have the following Text (German): Florian Homm wuchs als Sohn des mittelständischen Handwerksunternehmers Joachim Homm und seiner Frau…
-1
votes
1 answer

How to apply text formatting to a listbox in Microsoft Access using VBA?

I would like to remove comma or period and capitalize the first letter of last name, I can only do with a textbox which I have to insert last name every time Here is my code for the textbox: Private Sub Command2_DblClick(Cancel As Integer) Text19…
james
  • 11
  • 1
  • 8