capitalization

Capitalize Words in PHP with custom delimitor

Hey guys, i need a method to capitalize every first letter of a word. This is what i got so far and it is working for almost every string...but it fails on this one "WELLNESS & RENOMME". // method in stringModify Class function capitalizeWords($words, $charList) { $capitalizeNext = true; for ($i = 0, $max = strlen($wo...

Capitalization of Person names in programming

Hey all, Is anyone aware of some code/rules on how to capitalize the names of people correctly? John Smith Johan van Rensburg Derrick von Gogh Ruby de La Fuente Peter Maclaurin Garry McDonald (these may not be correct, just some sample names and how the capitalization could be/work) This seems like a losing battle... If anyone has...

Capitalize only first character of string and leave others alone? (Rails)

Hi, I'm trying to get Rails to capitalize the first character of a string, and leave all the others the way they are. I'm running into a problem where "i'm from New York" gets turned into "I'm from new york." What method would I use to select the first character? Thanks EDIT: I tried to implement what macek suggested, but I'm getti...

Third-party titlecase method in Python

The standard string title() method in Python is pretty naive and doesn't correctly handle converting even fairly simple words and phrases to title case (hyphenated words, phrases with quotes, phrases with prepositions, etc.). In Googling around, I found a few solutions in different languages to this problem. Can anyone recommend a good ...

Turn all titles in wordpress powered site into "Capitalized" case

So what i need is a query or some tip on how to turn all titles on a wordpress powered website into capitalized case. What i have now is something like this: AAAAA BBBBB CCCCC I want it to be like this: Aaaaa Bbbbb Ccccc I did try googling and searching here, but have failed at that task so any help is much appreciated! UPDATE: I ...

Hibernate property name capitalisation issue

Hi all, I have a problem with how hibernate/JavaBeans constructs property names. Here's my property. private boolean aNumberFl; @Column( name = "aNumberFl", nullable = false ) @Type( type = "yes_no" ) public boolean getANumberFl() { return aNumberFl; } public void setANumberFl( boolean var ) { this.aNumberFl = var; } Every...

How to set initial caps in VIM?

In VIM, it's really easy to change a word of text to use uppercase or lowercase: # in visual mode # change word to uppercase gUw # change word to lowercase guw Is there a simple way to modify the word to use initial caps? ...

MySQL - Capitalize first letter of each word, in existing table

Hi all. I have an existing table 'people_table', with a field 'full_name'. Many records have the 'full_name' field populated with incorrect casing. e.g. 'fred Jones' or 'fred jones' or 'Fred jones'. I can find these errant entries with: SELECT * FROM people_table WHERE full_name REGEXP BINARY '^[a-z]'; Q. How can I capitalize the...

Javascript createElement

Hi there, I want to create inline SVG graphics using Javascript. However, it seems like createElementNS function applies some normalization and transforms all tags to lowercase. That is fine for HTML but not for XML/SVG. The NS I used is http://www.w3.org/2000/svg. In particular I have problems creating a element. As it will be appen...

Sorting an Array of strings with capital and lowercase letters in C

Is there a way to sort an array of strings in alphabetical order where the strings contain both capital and lowercase letters? Because capital letters have a lower ASCII value so functions like strcmp would always show that it is before a lower case letter. For example, lets say we wanted to sort "ABCD", "ZZZZ", "turtle", "JAVA", "wate...

Moving Oracle data (and index) to SQL-Server - capitalization in data

I'm trying to move data from an Oracle (10g) database to SQL-Server (2008). I also want the indexes to be re-created on the SQL-Server side. However, in Oracle, there is a primary key defined on the first two fields, and it has data like this: VALUE3 FOO4 VALUE4 FOO8 Value4 Foo8 When I get that data to SQL Server, it won't mak...

How to make everything in a textfield be capital letters / uppercase?

I want to make everything I write in a textfield to be capital letters. As I write, not after losing focus. How do I do this using jQuery? ...

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 tried with AWK and SED but i didn't find the right solution. Can someone help? ...