Re: [WebDNA] checking for mixed case text
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 102727
interpreted = N
texte = Well done Ken! That's an approach I'd not thought of and to me seemslike the most straight forward and re-usable. I now remember gettinghung up on the [lookup] because it is in fact case sensitive. That isafter all the main point of this thread...MarcKenneth Grome wrote:>> But I cannot figure out how to get WebDNA to check a text>> string to report whether it is mixed case or not.> > > Here's another approach:> > Set the text string to a text variable (var) then create an > up.db with only one field (letter). Create one record in > this db for each uppercase letter in the alphabet, plus one > record for each non-alphabetic character that might occur in > a name.> > Then use this code:> > [math show=f]numUp=0[/math]> [text]numChars=[countchars][var][/countchars][/text]> > [listchars chars=[var]]> [showif [char]=[lookup > db=up.db&value=[char]&lookinfield=letter&returnfield=letter]]> [math show=f]numUp=numUp+1[/math]> [/showif]> [/listchars]> > [showif [numChars]=[numUp]]> all letters are uppercase> [/showif]> > [showif [numChars]![numUp]]> some letters are not uppercase> [/showif]> > > Sincerely,> Ken Grome> > > > ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/> .> -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Associated Messages, from the most recent to the oldest:
Well done Ken! That's an approach I'd not thought of and to me seemslike the most straight forward and re-usable. I now remember gettinghung up on the [lookup] because it is in fact case sensitive. That isafter all the main point of this thread...MarcKenneth Grome wrote:>> But I cannot figure out how to get WebDNA to check a text>> string to report whether it is mixed case or not.> > > Here's another approach:> > Set the text string to a text variable (var) then create an > up.db with only one field (letter). Create one record in > this db for each uppercase letter in the alphabet, plus one > record for each non-alphabetic character that might occur in > a name.> > Then use this code:> > [math show=f]numUp=0[/math]> [text]numChars=[countchars][var][/countchars][/text]> > [listchars chars=[var]]> [showif [char]=[lookup > db=up.db&value=[char]&lookinfield=letter&returnfield=letter]]> [math show=f]numUp=numUp+1[/math]> [/showif]> [/listchars]> > [showif [numChars]=[numUp]]> all letters are uppercase> [/showif]> > [showif [numChars]![numUp]]> some letters are not uppercase> [/showif]> > > Sincerely,> Ken Grome> > > > ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/> .> -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Marc Thompson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[protect] error page (1997)
UPDATE PROBLEM (1997)
syntax question, not in online refernce (1997)
Multiple catalog databases and showcart (1997)
WebCatalog2 Feature Feedback (1996)
all records returned. (1997)
WebDNA Solutions ... sorry! (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Add a field to the error log? (1997)
SetHeader context (1998)
select menus & database design (1998)
WebCat2: multiple currency support (1997)
WebCatalog can't find database (1997)
It gets better... posting problems + Webcat 3.0.7 available - did anyone know? (2000)
Need relative path explanation (1997)
Upgrage pricing... The future of WebCatalog is coming (2000)
Mac v. NT (1998)
[BoldWords] WebCat.acgib15Mac (1997)
WebCatalog NT (1996)
japanese characters (1997)