Hi,

I want to create a function to test the first character of a string to see if it is lower or upper case, and change it accordingly. However, the rest of the string has to stay the same.

Dim S As String = "C:\Users\profile"


should be returned as "c:\Users\profile"

any help is much appreciated.

cheers,

jono

Recommended Answers

dim str as String = "C:\Users\profile"
str = str.Substring(0, 1).ToLower & str.Substring(1)
Jump to Post

All 2 Replies

dim str as String = "C:\Users\profile"
str = str.Substring(0, 1).ToLower & str.Substring(1)

Gee, that simple Huh!

Cheers,

Jono

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.