Ask a Question related to ASP.NET General, Design and Development.
-
Brad Smith #1
Function to evaluate whether a string is all UPPER
I'm trying to clean up strings in a web form before I plug the fields
into a database. Lots of folks like to leave caps lock key on and
yell their form entries.
I can figure out how to change strings to sentence case, but I don't
want to do it to every string since some correctly entered words e.g.
"to" would be converted unnecessarily (to "To"). I'm willing to live
with the over correction on a few strings, but don't want to apply it
to the entire database.
Has anyone used a function to evaluate whether a string has been
entered all in upper case?
Thanks,
Brad Smith
pbs at myrealboxNOSPAM.com
remove NOSPAM from address and replace at with @ to email me directly
Brad Smith Guest
-
evaluate string
Hi I hve a list mylist= I am inserting the values dynamically in the string format in the list and the list becomes mylist=] or mylist=] now... -
problems with evaluate-function and " ' " in query
hello. strange problem. let's say i have the following variable: cfset content = "let's rock" if i make an insert-query into a ms sql server... -
Evaluate variables in midst of a string!
I need help evaluating variables in the middle of a string. I am querying a table and one of the rows outputs the following code: Hello #username#!... -
String formatting function - First char Upper, rest lower
Hi, Newbie question. Does anyone know of a function or script that will capitalize the first char and lowercase the remaining chars of each... -
OCI_ASSOC returns key with upper case string
Hello, First let me say that I am not sure if this is PHP problem or Oracle. I have a class that contains API for using postgresql, mysql, or... -
Kevin Spencer #2
Re: Function to evaluate whether a string is all UPPER
Convert the string to all upper case, and compare the result to the original
string. If they are equal, the original string is all upper case.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"Brad Smith" <pbs@mailandnews.com> wrote in message
news:65529f27.0306270727.2bea89c3@posting.google.c om...> I'm trying to clean up strings in a web form before I plug the fields
> into a database. Lots of folks like to leave caps lock key on and
> yell their form entries.
>
> I can figure out how to change strings to sentence case, but I don't
> want to do it to every string since some correctly entered words e.g.
> "to" would be converted unnecessarily (to "To"). I'm willing to live
> with the over correction on a few strings, but don't want to apply it
> to the entire database.
>
> Has anyone used a function to evaluate whether a string has been
> entered all in upper case?
>
>
> Thanks,
>
> Brad Smith
> pbs at myrealboxNOSPAM.com
> remove NOSPAM from address and replace at with @ to email me directly
Kevin Spencer Guest
-
Blaise Pascal Tine #3
RE: Function to evaluate whether a string is all UPPER
Hi Brad,
Could you try this:
string a = "Dodo";
if (a == a.ToUpper())
{
// the string is all in uppercase!
}
Thanks,
Blaise Pascal Tine (MSFT).
--------------------15:27:01 GMT)>From: [email]pbs@mailandnews.com[/email] (Brad Smith)
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Subject: Function to evaluate whether a string is all UPPER
>Date: 27 Jun 2003 08:27:00 -0700
>Organization: [url]http://groups.google.com/[/url]
>Lines: 19
>Message-ID: <65529f27.0306270727.2bea89c3@posting.google.com >
>NNTP-Posting-Host: 129.111.166.176
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1056727621 21410 127.0.0.1 (27 Jun 2003cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin>X-Complaints-To: [email]groups-abuse@google.com[/email]
>NNTP-Posting-Date: 27 Jun 2003 15:27:01 GMT
>Path:
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-
xit-09!supernews.com!postnews1.google.com!not-for-mail>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:155460
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>I'm trying to clean up strings in a web form before I plug the fields
>into a database. Lots of folks like to leave caps lock key on and
>yell their form entries.
>
>I can figure out how to change strings to sentence case, but I don't
>want to do it to every string since some correctly entered words e.g.
>"to" would be converted unnecessarily (to "To"). I'm willing to live
>with the over correction on a few strings, but don't want to apply it
>to the entire database.
>
>Has anyone used a function to evaluate whether a string has been
>entered all in upper case?
>
>
>Thanks,
>
>Brad Smith
>pbs at myrealboxNOSPAM.com
>remove NOSPAM from address and replace at with @ to email me directly
>Blaise Pascal Tine Guest



Reply With Quote

