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
3
votes
3 answers

Javascript Capitalize first letter of each word ignore Contractions

I am trying to Capitalize the first letter of each word in a string. I found similar questions online but none seem to answer my question of ignoring Contractions like can't, won't, wasn't. This snippet of code works but it also capitalizes the…
Shayne
  • 33
  • 3
3
votes
3 answers

How to replace a code not by capitalizing the other ones?

sentence = str ( input ( "Enter a sentence:" ) ) sentence = sentence.split ( ) new = "" for word in sentence: wordi = ord ( word[ 0 ] ) cap = word[ 0 ] a = chr ( (ord ( cap ) - 32) ) word1 = word.replace ( word[ 0 ] ,a ) if…
Peter
  • 57
  • 4
3
votes
2 answers

Capitalize first letter in java script

I know this has been answered before, but I'm a newb and I can't get it to work in my situation. Basically, I have pages that call the URL and display part of them on the page. I am hoping to have the first letter of the displayed word capitalize…
bhfuser
  • 33
  • 3
3
votes
4 answers

how to get dateformat to capitalize month and day

I have my strings like so in my strings.xml: EEEE dd. MMMM MMMM dd And I use them like this in the code: private void reinit() { …
tristan202
  • 1,081
  • 3
  • 19
  • 28
3
votes
2 answers

About Python capwords

from string import capwords capwords('\"this is test\", please tell me.') # output: '\"this Is Test\", Please Tell Me.' ^ Why is it not equal to this? ↓ '\"This Is Test\", Please Tell Me.' ^ How can I do it?
yuuske
  • 43
  • 1
  • 1
  • 4
3
votes
2 answers

Capitalize the last letter in a string (with letters and numbers) using jQuery

I'm using the following jQuery to capitalize the 1st letter of an input script. $('li.capitalize input').keyup(function(event) { var textBox = event.target; var start = textBox.selectionStart; var end = textBox.selectionEnd; …
maelga
  • 848
  • 9
  • 15
3
votes
0 answers

How to format sfChart DateTimeAxis Label Style so that it contains only capitalized words

I am using SyncFusion for graphics. For that purpose, I am specifically using SfChart component. In this component, I want to be able to format dates as following: MON,TUE,WED,THU,FRI,SAT,SUN (That means that show only days with capital letters) To…
Emrah Akgül
  • 630
  • 2
  • 7
  • 18
3
votes
5 answers

Remove whitespaces and capitalize user input

I've made the code so it asks the user various questions, and if the input.trim().isEmpty() a message will be given to the user and will ask the user to input again. So if the user just writes blank spaces, message given. If the user gives a few…
Ilja
  • 85
  • 1
  • 7
3
votes
5 answers

How to capitalize and uppercase in AngularJS?

I want to capitalize/uppercase some fields in a HTML form. HTML
Mistalis
  • 17,793
  • 13
  • 73
  • 97
3
votes
2 answers

Capitalize doesn't work on special characters - Python

I've been trying to capitalize loads of strings, and some of them start with utf-8 characters. Problem is, they don't capitalize! mystring = 'lucas' mystring.capitalize() # returns 'Lucas' mytring = 'æthelred' mystring.capitalize() # returns…
3
votes
4 answers

Capitalize first letter of each word between [ and ] in text file

EDIT: This question is different from other "capitalize first letter" questions because it requires capitalization only between "[" and "]". Since the title was incomplete, I have edited it. I have a text file in which I need to reformat the text. …
Stephen Lloyd
  • 733
  • 8
  • 21
3
votes
1 answer

Capital "i" issue with jquery selector

I'am having problem with jquery selector. Here is; Jquery Selector (new):