Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

PROPER Case Function

Aug
1,916
68
Here's a function that will convert an upper, lower, or mixed-case string to proper case;
Code:
proper=%@pshell[(Get-Culture).TextInfo.ToTitleCase("%$".ToLower())]
Proof;
Code:
e:\utils>echo %@proper[DAILY EPIDEMIOLOGICAL SUMMARY]
Daily Epidemiological Summary

Joe
 
Does anyone have a plugin - not that is dependent on power shell?
 
@CAPS does not convert to Proper case;
Code:
e:\utils>echo %@caps[DAILY EPIDEMIOLOGICAL SUMMARY]
DAILY EPIDEMIOLOGICAL SUMMARY

Joe
 
Maybe a @proper["test to convert"] which would handle Mc and other similar prefixes correctly..... McCarthy instead of just Mccarthy....
 
Try %@caps[%@lower[any OLD Text]] in TCC for the @proper described above. No, it won't do the right thing for McCarthy and friends.
 
Back
Top