473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Uppercase

Hello,

How can I make the first letter of a string to be upper case?

Thanks,
Miguel

Sep 30 '06 #1
7 2227
Hi,
if you mean you want to make this to some text displayed on a web page, you
can apply the following style attribute "text-transform:capitalize"

Regards,
Mohamed Mosalem

"shapper" <md*****@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Hello,

How can I make the first letter of a string to be upper case?

Thanks,
Miguel

Sep 30 '06 #2
I don't want to use a CSS style.

I have a string in my VB.Net code which is taken from a DateTime
variable.

The problem is that the weekday in Asp.Net 2.0 when culture is pt-PT
comes with the first letter in lower case. This is wrong. I have no
idea why Microsoft didn't notice it.

So I have a string as folows: "domingo".
I want to change it to "Domingo".

Thanks,
Miguel
Mohamed Mosalem wrote:
Hi,
if you mean you want to make this to some text displayed on a web page, you
can apply the following style attribute "text-transform:capitalize"

Regards,
Mohamed Mosalem

"shapper" <md*****@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Hello,

How can I make the first letter of a string to be upper case?

Thanks,
Miguel
Sep 30 '06 #3
"shapper" <md*****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I don't want to use a CSS style.
Why not?
I have a string in my VB.Net code which is taken from a DateTime
variable.

The problem is that the weekday in Asp.Net 2.0 when culture is pt-PT
comes with the first letter in lower case. This is wrong. I have no
idea why Microsoft didn't notice it.
They did notice it - so much so, in fact, that they followed the standard
practice in Portuguese (and quite a few other European languages) of not
capitlising day names. We say "Sunday" in English, but in Spanish and
Portuguese they say "domingo" and in French they say "dimanche", not
"Dimanche".
So I have a string as folows: "domingo".
I want to change it to "Domingo".
So what's stopping you...?

Dim strDay As String = "domingo"
strDay = StrConv(strDay, VbStrConv.ProperCase)
Sep 30 '06 #4
Mark,

Yes, you are right.
In some European languages day names are not capitlised.
So in Portuguese, "Sunday" is "domingo".
But, in Portuguese, like in other european languages, there is also a
rule which says every first word of a phrase must be capitlised.
So when you have a date time format which is something like:
domingo, 20 de Janeiro de 2006 it should be Domingo, 20 de Janeiro de
2006.
It has nothing to do with the word.
It has to do with the position of the word in the phrase.

I will try your code now.

Thanks,
Miguel

Mark Rae wrote:
"shapper" <md*****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
I don't want to use a CSS style.

Why not?
I have a string in my VB.Net code which is taken from a DateTime
variable.

The problem is that the weekday in Asp.Net 2.0 when culture is pt-PT
comes with the first letter in lower case. This is wrong. I have no
idea why Microsoft didn't notice it.

They did notice it - so much so, in fact, that they followed the standard
practice in Portuguese (and quite a few other European languages) of not
capitlising day names. We say "Sunday" in English, but in Spanish and
Portuguese they say "domingo" and in French they say "dimanche", not
"Dimanche".
So I have a string as folows: "domingo".
I want to change it to "Domingo".

So what's stopping you...?

Dim strDay As String = "domingo"
strDay = StrConv(strDay, VbStrConv.ProperCase)
Oct 1 '06 #5
http://www.angrycoder.com/article.as...y=2001&m=4&d=9
"shapper" <md*****@gmail.comwrote in message news:11**********************@c28g2000cwb.googlegr oups.com...
Hello,

How can I make the first letter of a string to be upper case?

Thanks,
Miguel

Oct 1 '06 #6
"shapper" <md*****@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
In some European languages day names are not capitlised.
So in Portuguese, "Sunday" is "domingo".
But, in Portuguese, like in other european languages, there is also a
rule which says every first word of a phrase must be capitlised.
LOL! Well obviously, but that's the same for *every* word if it is the first
word in a sentence, not just days of the week. The difference is that the
*default* spelling of days of the week in Portuguese, like in most other
European languagues except English, is all lower-case. Same with months.
E.g. today in French we might say "Aujourd'hui nous sommes dimanche le 1er
octobre 2006" - neither the day nor the month would be capitalised.
Oct 1 '06 #7
Mark,

Yes, I know, but if there is a DateTime format that returns:
"sábado, 20 de Janeiro de 2006" *

Why not write "Sábado"?

The phrase I mentioned * is usually used alone such as in letters and
news not inside a text. Well, at least in that form and in most of the
times.

Anyway, this is just my opinion ... but i will just apply a upper case
to the week day.
No problem there. :-)

Thanks,
Miguel
Mark Rae wrote:
"shapper" <md*****@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
In some European languages day names are not capitlised.
So in Portuguese, "Sunday" is "domingo".
But, in Portuguese, like in other european languages, there is also a
rule which says every first word of a phrase must be capitlised.

LOL! Well obviously, but that's the same for *every* word if it is the first
word in a sentence, not just days of the week. The difference is that the
*default* spelling of days of the week in Portuguese, like in most other
European languagues except English, is all lower-case. Same with months.
E.g. today in French we might say "Aujourd'hui nous sommes dimanche le 1er
octobre 2006" - neither the day nor the month would be capitalised.
Oct 1 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner,...
5
by: Paul Schwann | last post by:
Hi everybody, I have a problem with the following code: #include <iostream> int main(void) { std::cout << std::hex << std::uppercase << 31 <<std::endl; return 0;
8
by: Markus Dehmann | last post by:
My ios::uppercase (and others) seems not to work. #include <iostream> using namespace std; int main(){ int num = 45; cout.setf(ios::hex | ios::showbase | ios::uppercase); cout << "number " <<...
13
by: GRoll21 | last post by:
I know there is a function but I cannot seem to find it. There should be a way to uppercase a char right? Here is what I got. cout << "Enter title of a book for look up: "; cin >>...
2
by: Thomas McK | last post by:
Hi all, I'm trying to make a SQL query (against a table in MS Access) where I want to take the value of something, and check to see if the first two letters in that value are capitalized (for...
1
by: The_Kingpin | last post by:
Hi all, I need to make a function that convert a string into a certain format. Here what are the restriction: -The first letter of the first and last name must be uppercase. -If a first name...
1
by: Beffmans | last post by:
How can I turn the Uppercase mode on in my TextBoxes? ch B. *** Sent via Developersdex http://www.developersdex.com ***
6
by: feeman | last post by:
I can change a field to upper case by using the after event function and the following code Me. = UCase(Me.) But how can you do it so that the whole form will change to Uppercase, there are...
6
by: 182719 | last post by:
<?php $testcase = 'AKLWC139'; if (ctype_upper($testcase)) { echo "The string $testcase consists of all uppercase letters. \n"; } else { echo "The string $testcase does not consist of all...
4
by: Hrsoft | last post by:
I'm a newbie with asp.net I need to transform a user textbox to uppercase, when typing. Is this possible? I read about Ajax Maskedit, but it is only to certain formats, like dates, etc Thanks...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.