propercase

G

Guest

ProperCase for normal usage is simple:
Dim s, s1, s2 As String
s = "DENNIS TURNER"
s1 = StrConv(s, VbStrConv.ProperCase)

Even with names it's simple Turner, Dennis
Turner, Mr. Dennis

But thereafter it can become more complicated:

Turner, Dennis Md
Turner, Dennis Phd

I can go through the 10 or 15 most likely suspects and handle them with
select case statements. However, I feel I am reinventing the wheel.

Somewhere, someplace, somebody must have created a class that already
handles a great number of these annoyances. I would appreciate being
directed to it.

Thank you.

Dennis
 
P

Peter Huang

Hi

For the msdn, we know that the ProperCase is used to convert the first
letter of every work to uppercase.
ProperCase vbProperCase Converts the first letter of every word in the
string to uppercase.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/
vamscStrConvConstants.asp

I am not sure what do you want to do,do you mean you want to convert the
TURNER, Dennis PHDas the format of Turner, Dennis PHD?
If so, I think you may need to exclude the Phd from the conversion string.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top