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
18
votes
16 answers

Trying to capitalize the first character in array of strings, why this is not working?

I'm trying to write a function that converts for example list-style-image to listStyleImage. I came up with a function but it seems not working. Can anybody point me to the problem here ? var myStr = "list-style-image"; function camelize(str){ …
Rafael Adel
  • 7,673
  • 25
  • 77
  • 118
18
votes
2 answers

How would I make Apache case insensitive using .htaccess?

I recently switched from IIS to Apache and unfortionately some of my links have capitalization issues. I have seen quite a few people talking about how to rewrite urls to be all lowercase or all uppercase but I need something to just make Apache…
user1397143
  • 193
  • 1
  • 1
  • 4
18
votes
4 answers

Is the convention for naming make files to use a capital 'm', such as Makefile?

Possible Duplicate: Should I name “makefile” or “Makefile”? What's the standard convention for make files as far as its capitalization. I've seen both Makefile and makefile. Does it depend on language? Project?
Piper
  • 1,266
  • 3
  • 15
  • 26
16
votes
11 answers

TWIG: capitalize makes other letters small

I have a variable with this content "i want HTML" When I make capitalize {{ variable|capitalize }} the sentence is: "I want html" How can I write only the FIRST letter of the sentence big in TWIG and the others stay like they are!?
Zwen2012
  • 3,360
  • 9
  • 40
  • 67
16
votes
5 answers

How to Capitalize first letter only using CSS in each case

I want to Capitalize first letter only and other should be small using CSS String is: SOMETHING BETTER sOMETHING bETTER Something better but the result should be Something Better Is this possible using CSS? To Capitalize first letter I am using…
Kabir
  • 2,126
  • 5
  • 21
  • 24
16
votes
3 answers

R: Capitalizing everything after a certain character

I would like to capitalize everything in a character vector that comes after the first _. For example the following vector: x <- c("NYC_23df", "BOS_3_rb", "mgh_3_3_f") Should come out like this: "NYC_23DF" "BOS_3_RB" "mgh_3_3_F" I have been…
Mikko
  • 7,530
  • 8
  • 55
  • 92
15
votes
3 answers

How can I capitalize a string showed by Thymeleaf into a page?

I am working on a Spring MVC application that uses Thymeleaf as template engine and I am trying to capitalize some string showed into my page. On my page I have something like this:
  • AndreaNobili
    • 40,955
    • 107
    • 324
    • 596
  • 14
    votes
    2 answers

    Returning false in shouldChangeTextInRange method auto capitalize all letters

    I am seeing a strange issue with UITextView in latest iOS versions. As per my current understanding, it is only occurring in iOS 13.  One of my users reported this on iOS 12.4.1, though I am unable to reproduce this on any pre iOS 13 devices. I have…
    Krishnabhadra
    • 34,169
    • 30
    • 118
    • 167
    14
    votes
    3 answers

    Using stream API to set strings all lowercase but capitalize first letter

    I have a List and through only using the stream API I was settings all strings to lowercase, sorting them from smallest string to largest and printing them. The issue I'm having is capitalizing the first letter of the string. Is that…
    Devin
    • 277
    • 2
    • 15
    13
    votes
    5 answers

    Regex using Notepad++ to add space before a capital letter

    I have looked around and found good answers but none work with notepad++, most are for java and php. I have found the search strings below but obviously I'm a noob with regex as i don't know what open/close tags are proper in notepad++. I would…
    MojoMan
    • 131
    • 1
    • 1
    • 3
    13
    votes
    1 answer

    Converting part of a string to upper case in CMake

    Is there a convenient way to transform a string that is all lower case so that the first character is upper case? I currently have a working solution: #PROTO_NAME is the lower-case string string(SUBSTRING ${PROTO_NAME} 0 1…
    Anthony
    • 12,177
    • 9
    • 69
    • 105
    12
    votes
    8 answers

    How should I capitalize Perl?

    PERL? Perl? perl? 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.
    Piers Cawley
    • 686
    • 6
    • 13
    12
    votes
    3 answers

    Trying to capitalize the first letter of each word in a text field Using Swift

    I'm trying to capitalize the first letter of each word I put into a text field. I would like to put this code in here: func textFieldShouldReturn(textField: UITextField) -> Bool { //Here } My issue is that I have no idea what to put. I've tried…
    Andy Lebowitz
    • 1,471
    • 2
    • 16
    • 23
    12
    votes
    4 answers

    Capitalizing letters. R equivalent of excel "PROPER" function

    Colleagues, I'm looking at a data frame resembling the extract below: Month Provider Items January CofCom 25 july CofCom 331 march vobix 12 May vobix 0 I would like to capitalise first letter of each word and lower the…
    Konrad
    • 17,740
    • 16
    • 106
    • 167
    11
    votes
    1 answer

    Capitalize first letter after special characters

    I want to remove extra spaces, add spaces if required and capitalize first letter of each word after special character using R string <- "apple,banana, cat, doll and donkey; fish,goat" I want output as Apple, Banana, Cat, Doll and donkey; Fish,…
    Rajan
    • 453
    • 4
    • 22
    1 2
    3
    27 28